Closed aperry5544 closed 1 year ago
When serializing out a map that uses an enum as the key, the resulting map adds extra escaped quotes around the key name.
Example...
enum class MyEnum { Value0, Value1 }; JSONCONS_ENUM_TRAITS(MyEnum, Value0, Value1) std::map<MyEnum, int> my_map; my_map[MyEnum::Value0] = 5; my_map[MyEnum::Value1] = 10;
When serializing my_map it results in the following...
my_map
... "my_map": { "\"Value0\"": 5, "\"Value1\"": 10 } ...
I would instead expect the output to be
... "my_map": { "Value0": 5, "Value1": 10 } ...
Thanks for reporting this, fixed on master.
When serializing out a map that uses an enum as the key, the resulting map adds extra escaped quotes around the key name.
Example...
When serializing
my_map
it results in the following...I would instead expect the output to be