Нет описания

Benoit Blanchon dfd51b8f76 Added keywords.txt to allow syntax highlighting in Arduino IDE 12 лет назад
examples 4377a5020a Added example sketch 12 лет назад
utility 49f5843788 Initial commit 12 лет назад
JsonArray.cpp 9c7ff38bbf Added JsonArray::getBool() and JsonHashTable::getBool() 12 лет назад
JsonArray.h 9c7ff38bbf Added JsonArray::getBool() and JsonHashTable::getBool() 12 лет назад
JsonHashTable.cpp 9c7ff38bbf Added JsonArray::getBool() and JsonHashTable::getBool() 12 лет назад
JsonHashTable.h 9c7ff38bbf Added JsonArray::getBool() and JsonHashTable::getBool() 12 лет назад
JsonObjectBase.cpp 9c7ff38bbf Added JsonArray::getBool() and JsonHashTable::getBool() 12 лет назад
JsonObjectBase.h 9c7ff38bbf Added JsonArray::getBool() and JsonHashTable::getBool() 12 лет назад
JsonParser.h b3647a7d91 Parser size is now specified in bytes instead of number of tokens 12 лет назад
README.md 3b91a8a218 Added README.md 12 лет назад
keywords.txt dfd51b8f76 Added keywords.txt to allow syntax highlighting in Arduino IDE 12 лет назад

README.md

A malloc-free JSON parser for Arduino

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.

Example

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");