I want c++11 json library with such two simple features:
-
For output allow code like this(usage of json11), with help of
std::initializer_list
:std::cout << json11::Json{ json11::Json::object { { "Key4", json11::Json::object{ {"sub key", "data"} }}}} .dump();
-
Allow parse such input data
"{\"test1\": \"test1 value\"} {"
, for example picojson:std::string json = "{\"test1\": \"test1 value\"} {"; picojson::value v; std::string err; auto it = picojson::parse(v, json.begin(), json.end(), &err);
as result it(picojson) parse "{\"test1\": \"test1 value\"}"
and it
point to last symbol('{'
)
Simple enough requirement I think, but
So anybody know opensource c++11 library that support these two simple requirements?
Aucun commentaire:
Enregistrer un commentaire