Difference between dump() and get() functions #3776
Answered
by
falbrechtskirchinger
AndresDuque
asked this question in
Q&A
-
Hi there, As the title says; what's the difference between the dump() function and getstd::string() function? They both return a string. Example: object["url"].dump(); Cheers. |
Beta Was this translation helpful? Give feedback.
Answered by
falbrechtskirchinger
Sep 28, 2022
Replies: 1 comment 1 reply
-
https://json.nlohmann.me/api/basic_json/dump/ |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
AndresDuque
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dump()
serializes the entire (sub-)tree.get<T>()
returns the node value as the given typeT
if the node value is convertible toT
.https://json.nlohmann.me/api/basic_json/dump/
https://json.nlohmann.me/api/basic_json/get/