[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

JSON Deserialization

Posted on 2013-05-24
3
Medium Priority
?
379 Views
Last Modified: 2013-05-24
I have a complex user defined class that contains strings, and int, but also contains other class types, and lists of classes. A simple example is below:

public class Data
{
      public Int32 Id { get; set; }
      public String Name { get; set; }
      public List<Items> Items { get; set; }
}

public class Item
{
      public Int32 Id { get; set; }
      public String Name { get; set; }
}

Open in new window




I have managed to serialize an instance of this class using SimpleJSON.

The problem I have is de-serializing it back to an instance of the original strongly typed class.  

I have spent hours search the web, but cannot find any simple definitive answer.
0
Comment
Question by:townsma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 25

Accepted Solution

by:
Luis Pérez earned 2000 total points
ID: 39193682
Have you tried Json.Net? It's very easy to serialize/deserialize objects with this library, even if your objects contains complex properties.

http://james.newtonking.com/projects/json-net.aspx

Hope that helps.
0
 
LVL 6

Expert Comment

by:worm-getter
ID: 39193765
0
 
LVL 6

Author Closing Comment

by:townsma
ID: 39193784
Thanks, just what I was looking for.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question