Need a JSON parser for Unity3d

后端 未结 2 1593
悲哀的现实
悲哀的现实 2021-01-23 05:55

I need to deserialize some JSON objects. I tried to use Tiny-json library, but it\'s too slow. I tried to use Newtonsoft.Json, but it fails in webplayer with this error:

2条回答
  •  离开以前
    2021-01-23 06:27

    Unity 5.3 added Native support of Json Serializer. It is faster than others.

    JsonUtility.ToJson to convert a class to Json.

    JsonUtility.FromJson to convert Json back to class.

    For complete example and information regarding json arrays, see

    Serialize and Deserialize Json and Json Array in Unity

提交回复
热议问题