Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Jan 29, 2024
1 parent 670afdc commit d0943ce
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions nano/lib/object_stream.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#pragma once

#include <boost/type_index.hpp>

#include <cstdint>
#include <iomanip>
#include <memory>
Expand Down Expand Up @@ -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
{
Expand All @@ -344,8 +341,9 @@ class root_object_stream : private object_stream_base
template <class Value>
void write (Value const & value)
{
// ctx.os << boost::typeindex::type_id<Value> ().pretty_name ();
ctx.begin_object ();
stream_as_value (value, ctx);
ctx.end_object ();
}

// Handle `.write_range (container)`
Expand Down

0 comments on commit d0943ce

Please sign in to comment.