We have C++ JSON libraries? Any reason not to use those?