我写一个使用 http://json.org/java/ 库,一个Java servlet从MSSQL数据库中读取一些数据,并将其转换结果设置为一个JSON字符串。这个JSON字符串被消耗的是.NET客户端应用程序。使用HttpWebRequest对象在.NET应用程序调用JavaServlet。这样,我在我的.net应用程序现在有一个JSON字符串。
I am writing a Java servlet that uses the http://json.org/java/ libraries to read some data from a mssql database and convert the result set to a JSON string. This JSON string is being consumed by a .NET client app. The .net App calls the JavaServlet using HttpWebRequest object. This way I have a json string now in my .net app.
我想要做的就是这个JSON字符串转换成一个数据集,这样我可以在DataGrid中显示出来了。所有这一切,我发现在网上谈论数据集以JSON转换的例子..任何提示?
What I would like to do is convert this JSON string to a dataset so that I can display it it in a datagrid. All the examples that I have found online talk about converting a 'dataset to json'.. any tips?
推荐答案
该Json.NET库使得在.NET中使用简单的JavaScript和JSON格式的数据的工作。快速阅读和使用JsonReader和JsonWriter写JSON或一个方法调用使用JsonSerializer序列化的.NET对象。
The Json.NET library makes working with JavaScript and JSON formatted data in .NET simple. Quickly read and write JSON using the JsonReader and JsonWriter or serialize your .NET objects with a single method call using the JsonSerializer.
Json.NET codePLEX项目
请参阅这文章
相关推荐
最新文章