json2cpp
json2cpp copied to clipboard
Negative integer values are not handled properly
If I have some json that looks something like:
{ "foo" : -1 }
The value of -1 gets saved in the compilable output as the 2's complement unsigned value.
The problem is at line 76 in json2cpp.cpp:
return fmt::format("std::int64_t{{{}}}", value.get<std::**uint64_t**>());
Change that to std::int64_t and everything works great.