Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I need a small help.
I have JSON response variable and I need to deserialize that JOSN response into strings.

JSON Responce Example

C#
[
{""campaignId"": ""1348832038209"", ""campaignName"": ""Topup Fiesta"", ""campaignDescription"": ""description"", ""endDate"": ""31/12/2012"", ""status"": ""1""}
]


What I need to do is

C#
string Campaign ID = 1348832038209
string campaignName = Topup Fiesta


etc..


Thanks.
Posted
Updated 6-Jun-13 19:53pm
v2

1 solution

It makes little sense to deserialize the json string to individual variables. You should use strongly typed or dynamic objects.
There are several libraries you can use:
Jsn.NET[^]
fastJSON[^]
And so on...
 
Share this answer
 
v2
Comments
Soft009 10-Jun-13 23:46pm    
Thanks, This will help a lot...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900