Added JsonParserBase::parse() that returns a JsonValue

This commit is contained in:
Benoît Blanchon
2014-07-17 12:37:35 +02:00
parent 73eda08dd4
commit b6e3a37ad9
3 changed files with 9 additions and 10 deletions

View File

@ -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);
};
}
}