Forum Cross Platform with Xamarin

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Json serialization/deserialization with shared projects

Hi Guys,

Just switched from PCL to Shared Projects, because of WebClient( much simpler than HttpWebRequest by me). So now I want to have some json (de)serialization in my shared project. As I see System.Web is not supported and I see that people use JSON.NET which is some xamarin component.
1) How should i integrate this into my solution.
2) I don't understand why nu get packages and xamarin components cannot be added to shared porject. Maybe i just cannot understand what exactly are xamarin components and why they are available in PCL and not in Shared Projects.

Thanks;)

Best Answers

Answers

  • @hobeau Actually simply including JSON.NET package in Android and iOS projects I was able to use it from shared projects( which was somehow unintuitive to me, but i think i get it now). About your proposed solution, how do you add shared project and pcl at the same time ( I suppose I should add PCL and let it reference the shared project and the other projects( android, iOS ) should reference the PCL.

Sign In or Register to comment.