MCPcopy Create free account
hub / github.com/boostorg/json / serialize

Method serialize

bench/bench-conv.cpp:682–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

680 }
681
682 clock_type::duration
683 serialize(file_item const& fi, std::size_t repeat) const override
684 {
685 monotonic_resource mr;
686 storage_ptr sp;
687 if(is_pool_)
688 sp = &mr;
689
690 auto jv = boost::json::parse( fi.text, std::move(sp) );
691 auto data = construct_data(fi.index, jv);
692
693 auto const start = clock_type::now();
694 std::string out;
695 while(repeat--)
696 {
697 mpl::mp_with_index<supported_file_count>(
698 fi.index, convert_to_value{data, jv});
699 std::ostringstream os;
700 os.exceptions(std::ios::failbit);
701 os << jv;
702 out = os.str();
703 }
704 return clock_type::now() - start;
705 }
706};
707
708class boost_direct_impl : public base_boost_impl

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected