#include "utils.h" #include namespace NScUtils { void CopyField(const NSc::TValue& from, NSc::TValue& to) { to = from; } } // namespace NScUtils void TSerializer::Save(IOutputStream* out, const NSc::TValue& v) { TString json = Base64Encode(v.ToJson()); ::Save(out, json); } void TSerializer::Load(IInputStream* in, NSc::TValue& v) { TString json; ::Load(in, json); json = Base64Decode(json); v = NSc::TValue::FromJsonThrow(json); }