Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






My JSON data comes with a label for the root object

UserPost

23:11
08/05/2012


mistr_e

New Member

posts 2

Post edited 15:49 – 09/05/2012 by mistr_e


I'm sure I'm not using quite the terminology but I'll try to explain.

I'm using this JSON class for ASP classic.

http://www.webdevbros.net/2007…..038;hellip;..datatypes/


I can not get it to return my JSON without an initial label.

It returns

{"mandatorylabel": {"page": 1,"total": 1,"records": 6,"rows": [{"firstname": "Chris"},{"firstname": "Dave"}]}}

But I cannot find any settings to get jqGrid to understand it. It does work with this though.

{"page": 1,"total": 1,"records": 6,"rows": [{"firstname": "Chris"},{"firstname": "Dave"}]}

I can provide an empty string and indicate it's already enclosed to my ASP class giving me this

"": {"page": 1,"total": 1,"records": 6,"rows": [{"firstname": "Chris"},{"firstname": "Dave"}]}

But still no go with jqGrid.

Is there a jsonReader option I'm missing or should I be looking at issues with the ASP class?

Both results seem to be perfectly valid JSON responses.

Any help is greatly appreciated

16:11
09/05/2012


mistr_e

New Member

posts 2

I figured it out. If I use

Empty

 instead of

""

 as a label name it doesn't use a label at all.

16:19
09/05/2012


brandonkirsch

Ohio

Member

posts 9

For future reference, the jsonReader options are what you would use to adjust where JQGrid will look inside the JSON object for all of the different values you are supposed to supply.


About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

42 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9591

Posts: 28784

Membership:

There are 10168 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7009 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information