struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanley, Eric" <>
Subject JSON plugin
Date Thu, 13 Mar 2008 20:30:55 GMT
I am trying to use dojo and the JSON plugin, but I have hit a snag. I am
using JSON to serialize: ArrayList<Project> projectList.
It seems to do this fine, as I can see the result in firebug. The
problem I am having is that the JSON response seems to be missing
something, and I cant figure out how to remedy this. 
This is the dojo example json:
{ "cobblers": [
       {"filling": "peach", "timeToBake": 30 },
       {"filling": "cherry", "timeToBake": 35 },
       {"filling": "blueberry", "timeToBake": 30}
This is how they parse it (abbreviated):
console.dir(responseObject.cobblers[0].filling);  // Prints "peach"
In my code I run "console.dir(responseObject);" and get this displayed
in firebug:
        "mos":"Create something.",
        "name":"Alarming page",
        "result":"Waiting on something",
        "loe":{"id":4,"name":"Extra Large"},
        "mos":"Rewrite stuff.",
        "name":"Rewrite that",
        "result":"I done did it....",
That seems okay to me. I hit the snag when I try something like this:
This is whats returned:
 responseObject.projectList has no properties
Im not sure how to address the response. Any ideas?

This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message