Skip to content

Latest commit

 

History

History
30 lines (28 loc) · 614 Bytes

README.md

File metadata and controls

30 lines (28 loc) · 614 Bytes

hijson

It is based on SuperEasyJSON inspired by msgpack.

It can simply convert a vector or a map to Json Value.

	using test_map_t = unordered_map<string, vector<string>>;
	test_map_t map;
	map["v1"] = v1;
	map["v2"] = v2;
	map["v3"] = v3;
	Value mapValue = Convert(map);
	cout << Serialize(mapValue) << endl;
	test_map_t new_map;
	As<test_map_t>(mapValue, new_map);
	//adaptor macro
	class B
	{
	public:
		B() {};
		string s;
		int i;
		bool b;
		double d;
	public:
		HIJSON_DEFINE(s, i, b, d)
	};