public void Deserialize(string jsonData) { if (!initialized) { throw new InvalidOperationException("Not initialized!"); } EngineSerializerData data = jsonData.Deserialize <EngineSerializerData>(); Restore(data); data.Dispose(); }
public string Serialize() { if (!initialized) { throw new InvalidOperationException("Not initialized!"); } EngineSerializerData data = new EngineSerializerData(ValueWrappers); string str = data.Serialize(); data.Dispose(); return(str); }