Portable Class Library

Mar 28, 2012 at 6:30 PM

I'm using Portable Class Library to share some classes between a .NET 4 and WP7 project.  Can you add support for Portable Class Library to JSON.NET?  http://msdn.microsoft.com/en-us/library/gg597391.aspx

Apr 16, 2012 at 4:50 PM

Is some work being done on this issue? Being able to use JSON.NET from a Portable Class Library would be greatly useful!

Apr 22, 2012 at 10:10 AM

I managed to compile a stripped down version of JSON.NET (excluding all serialization machinery and stuff, including readers/writers and LINQ functionality) as a Portable Class Library. The purpose of the stripping down was just to make it compilable and usable for my project. I might publish the patches as a starting point, but it would be better if someone more knowledgeable of JSON.NET internals did it.

I added a PORTABLE symbol and fixed a whole lot of #if conditions. Some of the times it was just matter of ORring NETFX_CORE || PORTABLE, but not always. Portable limitations are not a union of the limitations of SILVERLIGHT || WINDOWS_PHONE, so it made sense to me to consider it as a case alone.

Apr 22, 2012 at 9:50 PM

I added support for a portable build to the source code a week ago.