Hi.

As suggested by ~s.o.s~ in another thread, I'm posting this question here in the high hopes that someone might be able to help me.

I have a JSON string coming in from a javascript that I need to convert to a predefined class object. I'd even settle for a struct.

The string in question may, or may not, contain an array of "objects". So that needs to be taken into consideration.

I've tried getting this to work with several methods by using different JSON libraries.
Two of the libraries are AjaxPro (which includes a JSON parser/serializer/deserialiser) and JayRock.

With JayRock I managed to import the JSON string into a variable of the datatype Object.
But I haven't worked much with that datatype so I'm having some trouble getting access to the data inside it.
During debugging I can see that it contains a JSONObject which in turn contains an ArrayList.

How do I convert this "object" into a workable .NET object so that I can access the data using properties?

I surely hope that anyone can understand my ranting and help/guide me with this problem.

Nevermind.
I solved the problem using a DataTable to send the information back and forth between client and server.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.