Indented serialisation
Can the output from value_from be indented to make reading output easier?
std::cout << boost::json::value_from( b ) << std::endl;
value_from doesn't output anything, it creates a value container. You essentially ask for indented serialisation. It won't be possible with operator<<, but we will think about implementing it for serialize.
Meanwhile, here's an example of how to do it manually https://www.boost.org/doc/libs/1_80_0/libs/json/doc/html/json/examples.html
value_fromdoesn't output anything, it creates avaluecontainer. You essentially ask for indented serialisation. It won't be possible with operator<<, but we will think about implementing it forserialize.
I took value_from from the docs, that is not working?
https://www.boost.org/doc/libs/develop/libs/describe/doc/html/describe.html#example_to_json
Is there a better way converting from structs to json?
No, why are you asking?