Arindam Mukherjee wrote:
In JSON we typically deal with maps and arrays. The arrays themselves could have arbitrary types (string, object, array, numeric, boolean, null) as elements. The key types in the maps are always strings and the value types in the maps could be anything that can appear in an array, including another map or array.
Due to this, I'd imagine being able to use Boost.Variant or Boost.Any in a list and as a value_type in a map would help.
Probably.
I find the most useful interface is to just provide a datatype you're
expecting and let the json parser try its best to do the right thing.
For example:
string raw_json = R"({
data:{
a:"hello",
b:"world",
c:3,
widget:3.5
}
})";
struct my_type1
{
map