示例#1
0
        public void Deserialize(string jsonData)
        {
            if (!initialized)
            {
                throw new InvalidOperationException("Not initialized!");
            }

            EngineSerializerData data = jsonData.Deserialize <EngineSerializerData>();

            Restore(data);
            data.Dispose();
        }
示例#2
0
        public string Serialize()
        {
            if (!initialized)
            {
                throw new InvalidOperationException("Not initialized!");
            }

            EngineSerializerData data = new EngineSerializerData(ValueWrappers);
            string str = data.Serialize();

            data.Dispose();
            return(str);
        }