diff --git a/nano/lib/object_stream.hpp b/nano/lib/object_stream.hpp index df04512369..65d7af5d2d 100644 --- a/nano/lib/object_stream.hpp +++ b/nano/lib/object_stream.hpp @@ -1,7 +1,5 @@ #pragma once -#include - #include #include #include @@ -331,8 +329,7 @@ class array_stream : private object_stream_base /** * Used for human readable object serialization. Should be used to serialize a single object. - * Includes the type of the value before writing the value itself. - * Outputs: `type_name{ field1: value1, field2: value2, ... }` + * Outputs: `{ field1: value1, field2: value2, ... }` */ class root_object_stream : private object_stream_base { @@ -344,8 +341,9 @@ class root_object_stream : private object_stream_base template void write (Value const & value) { - // ctx.os << boost::typeindex::type_id ().pretty_name (); + ctx.begin_object (); stream_as_value (value, ctx); + ctx.end_object (); } // Handle `.write_range (container)`