How to serialize and unserialize to/from a C# class?

Posted by Earlz on Stack Overflow See other posts from Stack Overflow or by Earlz
Published on 2010-06-10T16:16:47Z Indexed on 2010/06/10 16:22 UTC
Read the original article Hit count: 611

Filed under:
|
|

Hello, I have an object in Javascript that looks like this

function MyObject(){
  this.name="";
  this.id=0;
  this.....
}

I then stringify an array of those objects and send it to an ASP.Net web service. Now what I want to do is do some processing on the JSON objects given to the webservice and return a JSON array of the same type of objects(same field names and such)

How would I do this easily? I am using Netwonsoft.Json.

Is there some way to turn a JSON string into a List or Array of an object?

© Stack Overflow or respective owner

Related posts about c#

Related posts about JSON