Changed the JsonParser template parameter to be the max number of tokens instead of the number of bytes

This commit is contained in:
Benoit Blanchon
2014-01-15 20:55:29 +01:00
parent 9fd5288c4d
commit 4e41eb515b
3 changed files with 40 additions and 18 deletions

View File

@ -9,7 +9,7 @@ void ParseAnObject()
{
char* json = "{\"Name\":\"Blanchon\",\"Skills\":[\"C\",\"C++\",\"C#\"],\"Age\":32,\"Online\":true}";
JsonParser<256> parser;
JsonParser<32> parser;
Serial.print("Parse ");
Serial.println(json);
@ -49,7 +49,7 @@ void ParseAnArray()
{
char* json = "[[1.2,3.4],[5.6,7.8]]";
JsonParser<256> parser;
JsonParser<32> parser;
Serial.print("Parse ");
Serial.println(json);