I am coding a JSON wrapper for Boost property tree.
Currently the focus is on writing the resulting JSON into a string or a file.
Using boost::property_tree::json_parser::write_json(ss, *pt) the resulting property tree is written in a string.
But this method do not understand what is a true, false, null or a number.
Everything is converted to a string.
Reading the Boost documentation this is a limitation of the library.
Is there any way to modify this behavior?
Link In this link is a fix for the problem.
It involves changing boost code, because of that I tried another alternative.
My solution involves regular expressions:
Basically I search for the keywords: true, false, null and any type of number.
The matches are replaced with the same without quotes.