在Mono中反序列化JSON数据 [英] Deserializing JSON data in Mono

查看:559
本文介绍了在Mono中反序列化JSON数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Monodroid时,是否有一种简单的方法将简单的JSON字符串反序列化为.NET对象? System.Json仅提供序列化(不反序列化),而我尝试过的各种第三方库都造成了Mono/Monodroid的问题. 谢谢.

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.

推荐答案

fastJSON适用.抓取所需的文件(Getters.cs,JSON.cs,JsonParser.cs,JsonSerializer.cs,SafeDictionary.cs)并将其嵌入到您的项目中并使用.它不使用任何特殊的.NET特定类,因此应与MonoDroid或Silverlight一起使用.

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.

这篇关于在Mono中反序列化JSON数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆