#pragma once #include #include #include #include namespace fc { class istream; class ostream; class path; namespace json { string to_string( const value& o ); value from_string( const string& s ); value from_string( const char* s, const char* e ); value from_string( const fc::vector& v ); string escape_string( const string& ); string unescape_string( const string& ); void write( ostream& out, const value& val ); template void write( ostream& out, const T& val ) { write( out, value(val) ); } template string to_string( const T& o ) { return json::to_string(value(o)); } template T from_string( const string& s ) { return value_cast( from_string(s) ); } value from_file( const fc::path& s ); template T from_file( const fc::path& s ) { return value_cast( fc::json::from_file(s) ); } } // namespace json } // fc