예제 #1
0
 static void Main()
 {
     var data    = new MyStruct("apa");
     var wrapper = new StructWrapper {
         StructData = data
     };
     var json = new WrapperJson {
         Data = wrapper
     };
     var jsonStr = json.ToJson();
 }
예제 #2
0
        public T[] FromJsonArray <T>(string json)
        {
            WrapperJson <T> wrapper = JsonUtility.FromJson <WrapperJson <T> >("{\"Items\":" + json + "}");

            return(wrapper.Items);
        }