Rocky Balboa
Rocky Balboa

Reputation: 814

How do I convert Json array into string in wcf?

I have seen many ways to convert json array into string but none of them are working.

Can anyone help me how do I convert json array into string in wcf.

Please help me through it.

Upvotes: 0

Views: 97

Answers (1)

Daniel
Daniel

Reputation: 1545

I using JSON.NET for serialize and deserialize objects. You can install it with nuget, http://www.nuget.org/packages/Newtonsoft.Json/

MyObject result = Newtonsoft.Json.JsonConvert.DeserializeObject<MyObject >(jsonString);

string stringResult = Newtonsoft.Json.JsonConvert.SerializeObject(myObject);

Upvotes: 1

Related Questions