
Michael Marcin wrote: I find the most useful interface is to just provide a datatype you're
I agree. This is, by far, the most intuitive interface. I understand how this can be implemented for data types like map or even Boost.Fusion vector in case of JSON multiple type arrays. However, I have no idea how to implement this in the example above with a struct! Unless of course there is no field name check nor type checking, and the JSON values are just copied sequentially into the struct regardless of field names. Btw I don't even know how to do this without using C++0x extended initializer lists. Otherwise we require some form of reflection in C++. I imagine I should look into Boost.Serialization...? I looked at Boost.Fusion adapt_struct, but that looks quite complicated. Am I missing something? Please let me know what you think. Kind regards, Stephan.
participants (2)
-
Bjorn Reese
-
Stephan Bourgeois