Boost.Serialization exposes an interface to read and write S-exprs. When you define codecs to your data structures in this manner, you’re only defining the mapping between your data structures and S-exprs. The JSON format can represent S-exprs easily through arrays.
struct Foobar {