Reputation: 799
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:
MissingMethodException: Method not found: 'System.Collections.ObjectModel.KeyedCollection.
What JSON parser do you recommend?
Upvotes: 2
Views: 7700
Reputation: 1875
You can try one of these open source solutions:
Or go with paid ones:
Upvotes: 2
Reputation: 125455
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
Upvotes: 2