|
|
12 lat temu | |
|---|---|---|
| examples | 12 lat temu | |
| utility | 12 lat temu | |
| JsonArray.cpp | 12 lat temu | |
| JsonArray.h | 12 lat temu | |
| JsonHashTable.cpp | 12 lat temu | |
| JsonHashTable.h | 12 lat temu | |
| JsonObjectBase.cpp | 12 lat temu | |
| JsonObjectBase.h | 12 lat temu | |
| JsonParser.h | 12 lat temu | |
| README.md | 12 lat temu | |
| keywords.txt | 12 lat temu |
The library is an convenient and efficient wrapper around the jsmn tokenizer: http://zserge.com/jsmn.html
It works without any allocation on the heap (no malloc) and supports nested objects.
char* json = "{\"Name\":\"Blanchon\",\"Skills\":[\"C\",\"C++\",\"C#\"],\"Age\":32,\"Online\":true}";
JsonParser<256> parser;
JsonHashTable hashTable = parser.parseHashTable(json);
if (!hashTable.success())
{
return;
}
char* name = hashTable.getString("Name");
JsonArray skills = hashTable.getArray("Skills");
int age = hashTable.getLong("Age");
bool online = hashTable.getBool("Online");