Deserializing JSON data in Mono

无人久伴 提交于 2020-01-03 17:44:59

问题


Is there an easy way to deserialize a simple JSON string into a .NET object when using Monodroid? System.Json only provides serialization (no deserialization) and the various third party libs I've tried were all causing problems with Mono/Monodroid. Thank you.


回答1:


fastJSON suits the bill. Grab the required files (Getters.cs, JSON.cs, JsonParser.cs, JsonSerializer.cs, SafeDictionary.cs) and embed them in your project and use it. It doesn't use any fancy .NET specific class so it should work with MonoDroid or Silverlight.



来源:https://stackoverflow.com/questions/5997288/deserializing-json-data-in-mono

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!