tgockel / json-voorhees

A killer modern C++ library for interacting with JSON.
http://tgockel.github.io/json-voorhees/
Apache License 2.0
128 stars 18 forks source link

formats_builder::check_references + compose #114

Closed tgockel closed 6 years ago

tgockel commented 6 years ago

Currently, use of formats_builder::check_references is followed by a jsonv::formats::compose with the same other parameter:

jsonv::formats fmts =
    jsonv::formats_builder()
        .type<my_thing>
            .
            .
            .
        .check_references(jsonv::formats::defaults())
    ;
return jsonv::formats::compose({ fmts, jsonv::formats::defaults() });

There should be a new function in the serialization builder DSL called compose_checked which combines these two operations.