File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -345,13 +345,13 @@ namespace daw::json_to_cpp {
345345 using daw::json::json_value_t ;
346346 config.cpp_file ( ) << fmt::format ( " namespace daw::json {{\n " ,
347347 cur_obj.object_name );
348+ config.cpp_file ( ) << fmt::format (
349+ " \t template<>\n\t struct json_data_contract<{}> {{\n " ,
350+ cur_obj.object_name );
348351 for ( auto const &child : *cur_obj.children ) {
349352 if ( config.hide_null_only and is_null ( child.second ) ) {
350353 continue ;
351354 }
352- config.cpp_file ( ) << fmt::format (
353- " \t template<>\n\t struct json_data_contract<{}> {{\n " ,
354- cur_obj.object_name );
355355 config.cpp_file ( ) << fmt::format (
356356 " \t\t static constexpr char const mem_{}[] = \" " , child.first );
357357 auto child_name =
@@ -389,8 +389,8 @@ namespace daw::json_to_cpp {
389389 }
390390 config.cpp_file ( ) << " \t >;\n\n " ;
391391
392- config.cpp_file ( ) << " \t\t static inline auto to_json_data( " << cur_obj. object_name
393- << " const & value ) {\n " ;
392+ config.cpp_file ( ) << " \t\t static inline auto to_json_data( "
393+ << cur_obj. object_name << " const & value ) {\n " ;
394394 config.cpp_file ( ) << " \t\t\t return std::forward_as_tuple( " ;
395395 is_first = true ;
396396 for ( auto const &child : *cur_obj.children ) {
You can’t perform that action at this time.
0 commit comments