I'm trying to create a transport object in Java for a json string. I'm using jqGrid which is a jquery plugin and it accepts a json string representing the data in the table. Up to now I've hand coded the bits to take the data I need and construct the json String. I need to create a JavaBean that I can use a JSON library on to make things easier. But the json string I am dealing with is making me wonder if it is even going to be possible.
That is a short example of the format of the json. Any help is appreciated. If I get something close in the mean time I'll post back.
I notice that in the original sample input, total appears to be an integer, and everything else is a string. In your generated output, total is a string, and id is an integer. Don't know if it matters, but it may cause some mismatch problems later. Or not.
Originally posted by Jim Yingst: I notice that in the original sample input, total appears to be an integer, and everything else is a string. In your generated output, total is a string, and id is an integer. Don't know if it matters, but it may cause some mismatch problems later. Or not.
Thanks Jim. It doesn't seem to matter at the moment. I've blogged about the whole thing here.
Hi Gregg, I read your blog and found out that you converted the Java Bean into JqGrid specific JSON string using FlexJSON which is build on Java 1.5. Is there any way I can do the same using JDK1.4? FlexJSON doesn't 1.5 binaries. Please suggest...