add online examples

This commit is contained in:
Niels 2015-06-29 23:02:41 +02:00
parent 540c58964d
commit 5ae2babf61
81 changed files with 239 additions and 1 deletions

31
doc/examples/README.cpp Normal file
View file

@ -0,0 +1,31 @@
#include <json.hpp>
using namespace nlohmann;
int main()
{
// create a JSON object
json j = {
{"pi", 3.141},
{"happy", true},
{"name", "Niels"},
{"nothing", nullptr},
{"answer", {
{"everything", 42}
}},
{"list", {1, 0, 2}},
{"object", {
{"currency", "USD"},
{"value", 42.99}
}}
};
// add new values
j["new"]["key"]["value"] = {"another", "list"};
// count elements
j["size"] = j.size();
// pretty print with indent of 4 spaces
std::cout << std::setw(4) << j << '\n';
}

1
doc/examples/README.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/GnGKwji06WeVonlI"><b>online</b></a>

1
doc/examples/array.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/NeN8wmHsQGxFXC6L"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/syN4hQrhPvlUy5AG"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/zwOKkXrKstDlMPjr"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/wKBBW3ORmTHPlgJV"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/Ti47m4DY2lV4SWNV"><b>online</b></a>

1
doc/examples/back.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/zB9tSkSVYIthfgj6"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/Hrajl95QUa1Lplou"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/vyrjruntW4ASDBKH"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/cyithYO7sPbXxK16"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/yO6SWuP9bEYvNEvX"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/FCiYtNwovQ84DWxl"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/h8c1hfORMnVrJ1Ky"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/z2P1DpA8uSSlwgTl"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/vwVgsv7w6YZUgctJ"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/wwzBU7cK8Xr2yiKJ"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/RzWnqhbfuvbHXCBJ"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/BPk4vUc4kJPWX0rz"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/P8QWpucrWhov8JRR"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/IWIZSNthuHrT3AS6"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/dvTtz7DIo8TDhYE6"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/hcERmrPzjmXeSzB8"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/47cqX7AduSWn24lA"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/RUSNdk5YEAr2vL4E"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/4IF0ofRq0nZcV8pI"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/dkznQmTMqulurCqD"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/S9jwK28ThNIGkdUI"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/xNtouqvB2OJBOwkv"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/ncOG8fdxNrISUNFj"><b>online</b></a>

1
doc/examples/begin.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/Nwb94PEGlvnjrqj1"><b>online</b></a>

1
doc/examples/cbegin.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/mWrMi5IrJjRILgir"><b>online</b></a>

1
doc/examples/cend.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/0OHrFwFGvRuDKdfx"><b>online</b></a>

1
doc/examples/clear.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/Ddggfbg18WXOIBkW"><b>online</b></a>

1
doc/examples/count.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/mPQHwiNeVa872Aky"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/XA8jRF4u0UBKMVKT"><b>online</b></a>

1
doc/examples/crend.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/XHuFmdmwqZ7Tdw2U"><b>online</b></a>

1
doc/examples/dump.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/tkZFGPekIFMEQYY0"><b>online</b></a>

1
doc/examples/empty.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/8vK2Qdo2tJk3loVq"><b>online</b></a>

1
doc/examples/end.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/PTRnmRsywWUoknqU"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/iqtEFeReXatgjqHy"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/4ZSaQAFaqyN8Vhop"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/vQ4ipI1dlW8IZhNh"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/foNekpKoDDTEfKuy"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/q5oRles9a6IgEOkD"><b>online</b></a>

1
doc/examples/front.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/OvihNTNV4XPwoSw8"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/fdsMCtY67vLJrlzv"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/4OkGAXhiCsa1E5Jx"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/Ka7Efl5Jo2FTDy69"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/pX9pR42isGha24Up"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/yBDoHvFIsRqoo7Ca"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/CwckRKEAALOpqiq7"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/xVKMzHSvo4XHFyxV"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/SbPvCBbOwWkIH5RX"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/CVMYqyeIFOKcBZZU"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/uXT6peoqwN6DIFAr"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/f5AMxY70IoQ4o0wb"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/ILh5L9NsOSQ29Cg4"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/D9WgQUo2eieU7kqs"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/RLNomTjexFIzyUx4"><b>online</b></a>

1
doc/examples/object.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/kQKYwNmQRJAJhCTe"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/PK8Jc2HcZ1MdHOFH"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/OTJgTuHDjzQlrONB"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/q0DrCAa87X0xR7vu"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/t8kFPBs2j2mN6VBc"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/NjX5TeaQdGHer7Xu"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/9X5Q8p7DlWA6v0Ey"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/x5eACUyqALnEmtJa"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/eyDuHRe4RnWdGv2o"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/2ZxOGwFs5YLdSOlG"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/XD9GkEmVZI9ecPEL"><b>online</b></a>

1
doc/examples/rbegin.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/qVpSdd1SQJeMkVQQ"><b>online</b></a>

1
doc/examples/rend.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/7oaTSGkGGPAiGxSU"><b>online</b></a>

1
doc/examples/size.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/GozebkNWdjby4a8N"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/qHbCdOUwZK6INFH8"><b>online</b></a>

View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/TKgXGJF9Cr5TXabd"><b>online</b></a>

1
doc/examples/type.link Normal file
View file

@ -0,0 +1 @@
<a target="_blank" href="http://melpon.org/wandbox/permlink/bYygSYwOFyTzN2Py"><b>online</b></a>