Json.NET under Unity3d for iOS

后端 未结 7 1362
你的背包
你的背包 2021-02-20 06:37

has anyone succeeded to adapt/port Json.NET to a version able to run under Unity3d deployed to iOS (and the webplayer, and android, too, but these seem less problematic), someho

7条回答
  •  心在旅途
    2021-02-20 07:06

    Have a look at the modified version of LitJson: UnityLitJson


    Actually LitJson has some issues and is not always working as expected, so I created a simple JSON-Lib that can handle all Unity3D Types, Enums and arbitrary classes. Find it at GitHub: Tiny-JSON

    You can use it very simple:

    // encode
    Animal a = new Animal(4);
    string json = Json.Encode(a);
    
    // decode
    IList a = Json.Decode>("[{\"legs\":4}, {\"legs\":2}]");
    

提交回复
热议问题