Skip to content

Instantly share code, notes, and snippets.

View signmotion's full-sized avatar
Building awesome

Andrii Syrokomskyi signmotion

Building awesome
View GitHub Profile
@signmotion
signmotion / rapidjson_gen_json.cpp
Created May 16, 2018 15:47 — forked from fclairamb/rapidjson_gen_json.cpp
Write some JSON using a rapidjson library
#ifdef SHELL
g++ -Wall -Werror -g -I../../cclib/rapidjson/include $0 && ./a.out
exit 0
#endif
// Output is:
// {"project":"rapidjson","stars":11}
// {"Name":"XYZ","Rollnumer":2,"array":["hello","world"],"Marks":{"Math":"50","Science":"70","English":"50","Social Science":"70"}}
// {"FromEmail":"sender@gmail.com","FromName":"Sender's name","Subject":"My subject","Recipients":[{"Email":"recipient@gmail.com"}],"Text-part":"this is my text"}