From d0943cee58330831f3e5524d7614a60c9a2d1809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Mon, 29 Jan 2024 18:02:30 +0100 Subject: [PATCH] WIP --- nano/lib/object_stream.hpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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)`