Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] JSON parsing... almost... [SOLVED]
- Date: Thu, 19 Aug 2010 00:54:09 +0900
- From: Dave M G <dave@example.com>
- Subject: Re: [tlug] JSON parsing... almost... [SOLVED]
- References: <4C6BDCA0.2080902@example.com> <4C6BF55E.4020808@example.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6
Simon, Thank you for responding.Who knows? But if you do console.log(dataObject), you can at least find out what it's sending you back.Well, I was about to write back and tell you that console.log(dataObject) outputs nothing, and JSON.parse gives me an error before that anyway...However, while tinkering with the code in order to provide a clear example of what I mean, I came across the source of my problem.Turns out, the $.post command is *already* turning the JSON response it gets into a Javascript object before it hands it over to the function you tell it to call.Which means that when I was calling JSON.parse on it, it was trying to parse an object into an object.Doh!So the problem turned out to be that it wasn't JSON.parse that I wasn't understanding, it was the $.post command. It automates things more than I knew.Thanks for responding inspiring me to go in the right direction. -- Dave M G
- References:
- [tlug] JSON parsing... almost...
- From: Dave M G
- Re: [tlug] JSON parsing... almost...
- From: Simon Cozens
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Laptop power consumption
- Next by Date: Re: [tlug] Laptop power consumption
- Previous by thread: Re: [tlug] JSON parsing... almost...
- Next by thread: [tlug] Die, "Adobe Bridge Workspace File"! Die!
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links