1

Is there a json library for c# that will work with windows phone 7 just read the data without serialising without using a datacontract.

I found fastJSON but that didn't work because it used reflection.

I don't want to serialize into an object just iterate through the json.

Edward
  • 7,346
  • 8
  • 62
  • 123
Joseph Le Brech
  • 6,541
  • 11
  • 49
  • 84

3 Answers3

2

http://json.codeplex.com/ JSON.NET would work well

Frazell Thomas
  • 6,031
  • 1
  • 20
  • 21
0

There is a similar question here:

Is there a library to read JSON in C# on Windows Mobile?

That says JSON.NET supports the Compact Framework 3.5. Silverlight uses the compact framework so this might be compatible. Either way, Googling doesn't yield much so it might be your closest match.

Community
  • 1
  • 1
Adam Houldsworth
  • 63,413
  • 11
  • 150
  • 187
  • Thats for windows mobile 6.5, this is for windows phone 7. There's a big difference. – TJHeuvel Jul 27 '11 at 13:45
  • @TJHeuvel The question? Yes I'm aware of that, but the use of the Compact Framework tends to impose limitations that are similar amongst versions. If it doesn't already support it, it is closer than most in doing so. – Adam Houldsworth Jul 27 '11 at 13:47
0

As others mentioned, JSON.NET does the job very well. But why bother with the extra work, when you can use a library build on top of JSON.NET.

RestSharp will make your life even easier. And it got automatic matching of properties, and many other fancy stuff, so you avoid having to add attributes everywhere.

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150