Skip to content

Commit

Permalink
Move method to preserve diff
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Jan 7, 2020
1 parent e7aea1c commit 557f2c2
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/io/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -567,25 +567,6 @@ namespace fc
return out;
}

template<typename T>
void to_stream( T& os, const variant_object& o, const fc::time_point& deadline, json::output_formatting format )
{
FC_CHECK_DEADLINE(deadline);
os << '{';
auto itr = o.begin();

while( itr != o.end() )
{
escape_string( itr->key(), os, deadline );
os << ':';
to_stream( os, itr->value(), deadline, format );
++itr;
if( itr != o.end() )
os << ',';
}
os << '}';
}

template<typename T>
void to_stream( T& os, const variants& a, const fc::time_point& deadline, json::output_formatting format )
{
Expand All @@ -603,6 +584,25 @@ namespace fc
os << ']';
}

template<typename T>
void to_stream( T& os, const variant_object& o, const fc::time_point& deadline, json::output_formatting format )
{
FC_CHECK_DEADLINE(deadline);
os << '{';
auto itr = o.begin();

while( itr != o.end() )
{
escape_string( itr->key(), os, deadline );
os << ':';
to_stream( os, itr->value(), deadline, format );
++itr;
if( itr != o.end() )
os << ',';
}
os << '}';
}

template<typename T>
void to_stream( T& os, const variant& v, const fc::time_point& deadline, json::output_formatting format )
{
Expand Down

0 comments on commit 557f2c2

Please sign in to comment.