forked from bblanchon/ArduinoJson
Added JsonParserBase::parse() that returns a JsonValue
This commit is contained in:
@ -21,15 +21,17 @@ namespace ArduinoJson
|
||||
{
|
||||
}
|
||||
|
||||
JsonValue parse(char* json);
|
||||
|
||||
/*
|
||||
* Parse the JSON string and return a array.
|
||||
*
|
||||
* The content of the string may be altered to add '\0' at the
|
||||
* end of string tokens
|
||||
*/
|
||||
JsonArray parseArray(char* json)
|
||||
DEPRECATED JsonArray parseArray(char* json)
|
||||
{
|
||||
return JsonArray(json, parse(json));
|
||||
return (JsonArray)parse(json);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -38,16 +40,14 @@ namespace ArduinoJson
|
||||
* The content of the string may be altered to add '\0' at the
|
||||
* end of string tokens
|
||||
*/
|
||||
JsonHashTable parseHashTable(char* json)
|
||||
DEPRECATED JsonHashTable parseHashTable(char* json)
|
||||
{
|
||||
return JsonHashTable(json, parse(json));
|
||||
return (JsonHashTable)parse(json);
|
||||
}
|
||||
|
||||
private:
|
||||
jsmntok_t* tokens;
|
||||
int maxTokens;
|
||||
|
||||
jsmntok_t* parse(char* json);
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user