Added JsonGenerator example for Arduino

This commit is contained in:
Benoît Blanchon
2014-07-01 14:08:15 +02:00
parent a9b8e280fe
commit e8831c28d9
15 changed files with 99 additions and 37 deletions

View File

@ -0,0 +1,30 @@
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
#include <JsonGenerator.h>
void setup()
{
Serial.begin(9600);
JsonHashTable<3> h;
h.add("pi", 3.14);
JsonArray<3> a;
a.add(1.0);
a.add(2.0);
a.add(3.0);
h.add("list", a);
h.add("hellow", "world");
Serial.print(h);
}
void loop()
{
}