Reducing Size / Compressing JSON String in C++ -
is there way compress json string in c++ , overall size can reduced ?
in case mobile app retreives xml create ccuserdefault, converts xml json using rapidjson. want reduce size or compress using cpp library.
assuming want minimise size of string (as opposed general compression such gzip), library such rapidjson
used.
there's example in this unit test:
roughly:
stringstream s("{ \"hello\" : \"world\" "); stringbuffer buffer; writer<stringbuffer> writer(buffer); reader reader; reader.parse<0>(s, writer); expect_streq("{\"hello\":\"world\"}", buffer.getstring());
Comments
Post a Comment