#include <jsoncons/json.hpp>
typedef basic_json<wchar_t,
Policy = order_preserving_policy,
Allocator = std::allocator<wchar_t>> wojsonThe wojson class is an instantiation of the basic_json class template that uses wchar_t as the character type. The original insertion order of an object's name/value pairs is preserved.
wojson behaves similarly to wjson, with these particularities:
-
wojson, likewjson, supports object memberinsert_or_assignmethods that take anobject_iteratoras the first parameter. But while withwjsonthat parameter is just a hint that allows optimization, withwojsonit is the actual location where to insert the member. -
In
wojson, theinsert_or_assignmembers that just take a name and a value always insert the member at the end.
wjson constructs a wide character json value that sorts name-value members alphabetically
json constructs a utf8 character json value that sorts name-value members alphabetically
ojson constructs a utf8 character json value that preserves the original insertion order of an object's name/value pairs