3

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.

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?

0

3 Answers 3

4

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 Project

See this article

Sign up to request clarification or add additional context in comments.

Comments

1

I prefer kiwi.json your can find a sample on datatable conversion right here: http://dancewithcode.wordpress.com/2012/03/24/case-study-custom-json-converter-for-datatable/

It will fit perfectly as a datasource.

Comments

0

You could also use RestSharp to interact with your service. I believe it has a converter to go to/from a dataset and JSON: http://restsharp.org/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.