| | |
JSON to class object
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jun 2006
Posts: 45
Reputation:
Solved Threads: 3
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.
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.
![]() |
Similar Threads
- Inserting dynamic values into Javascript variables (JavaScript / DHTML / AJAX)
- Unresponsive script (DaniWeb Community Feedback)
- XMLHttpRequest, out of the FF frying pan, into the IE frying pan. (JavaScript / DHTML / AJAX)
Other Threads in the ASP.NET Forum
- Previous Thread: Hi Help me i am new to asp.net
- Next Thread: text wrap around the image
| Thread Tools | Search this Thread |
.net 2.0 activexcontrol advice ajax alltypeofvideos application asp asp.net bc30451 bottomasp.net box browser button c# c#gridviewcolumn checkbox click commonfunctions confirmationcodegeneration css dataaccesslayer database datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dynamically edit expose feedback fileuploader fill flash form formatdecimal forms formview grid gridview gudi homeedition hosting iframe iis javascript jquery listbox login microsoft mono mouse mssql multistepregistration news numerical objects opera panelmasterpagebuttoncontrols parent radio redirect registration relationaldatabases reportemail rotatepage save schoolproject search security select silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking unauthorized validation vb.net video videos view virtualdirectory vista visualstudio web webapplications webdevelopemnt webprogramming webservice xml xsl youareanotmemberofthedebuggerusers





