-
Notifications
You must be signed in to change notification settings - Fork 4
JSON_GET_DOUBLE
Jurek Muszyński edited this page Mar 31, 2022
·
3 revisions
Retrieves double value from JSON object.
TRUE if element has been found, otherwise FALSE.
JSON json={0};
if ( !JSON_FROM_STRING(&json, some_string) )
OUT("some_string is not a JSON");
else
{
double value;
if ( !JSON_GET_DOUBLE(&json, "balance", &value) )
OUT("Couldn't get balance");
else
OUT("<p>Balance: %.2lf</p>", value);
}