-
Notifications
You must be signed in to change notification settings - Fork 53
JSON_PRESENT
Jurek Muszyński edited this page Sep 2, 2019
·
2 revisions
Checks the field's presence in JSON object.
true if the field is present, otherwise false.
JSON req={0};
if ( !REQ_DATA )
{
OUT("<p>Payload is required.</p>");
return false;
}
if ( !JSON_FROM_STRING(req, REQ_DATA) )
{
OUT("<p>Payload is not a valid JSON.</p>");
return false;
}
if ( !JSON_PRESENT(req, "description") )
{
OUT("<p>Description is required in payload.</p>");
return false;
}