You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to nlohmann json and I would first like to congratulate the developer on the best JSON library I've seen, its great!
I've looked for and seen requests for multiple key type functionality, which is something I use a lot. Where a hierarchical object structure is known, accessing it easily & safely can be tedious. I discovered today a very simple way of doing this with this library which I think would merit adding to the documentation. I parse an incoming JSON string containing and object and can extract an array of double values in a sub key using this straight forward method:-
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm new to nlohmann json and I would first like to congratulate the developer on the best JSON library I've seen, its great!
I've looked for and seen requests for multiple key type functionality, which is something I use a lot. Where a hierarchical object structure is known, accessing it easily & safely can be tedious. I discovered today a very simple way of doing this with this library which I think would merit adding to the documentation. I parse an incoming JSON string containing and object and can extract an array of double values in a sub key using this straight forward method:-
Very simple & safe without having to iterate though each layer of the JSON. The same "is_xxxxxxx()" method can be used to verify any known sub key.
Thanks
John.
Beta Was this translation helpful? Give feedback.
All reactions