www.webdeveloper.com
Results 1 to 3 of 3

Thread: JSON object fails to evaluate

  1. #1
    Join Date
    Sep 2009
    Posts
    51

    JSON object fails to evaluate

    Hi,

    I am trying to populate page elements from an AJAX call, which returns JSON.

    For some reason, JSON that looks like this, fails to evaluate, I'd like to understand what's wrong with it.

    JSON:
    Code:
    "{"objectList":[{"objectName":"Object 1","objectValue":3004}]}"

  2. #2
    Join Date
    Sep 2009
    Posts
    51

    P.s.

    At the same time this JSON:

    Code:
    "[{"objectName":"Object 1","objectValue":3004}]"
    evaluates just fine. The only difference between the two is that this last one, that evaluates successfully contains an array of objects. Whereas the first one I posted, that does not turn into a JS object successfully, contains an object, whose value is an array of objects.

    What am I doing wrong?

  3. #3
    Join Date
    Feb 2003
    Location
    Michigan, USA
    Posts
    5,773

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles