What glaze type to use for an empty json object? #2295
-
|
I guess it's |
Beta Was this translation helpful? Give feedback.
Answered by
stephenberry
Feb 2, 2026
Replies: 1 comment
-
|
An empty JSON object would mean struct empty {};That would be if you knew the object was always empty. glz::generic works if the object is usually empty but could sometime contain unknown data. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Curculigo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An empty JSON object would mean
{}. If you know the structure of your data you can just use a struct:That would be if you knew the object was always empty.
glz::generic works if the object is usually empty but could sometime contain unknown data.