It had to do with PHP's magic quotes...arg!
On Apr 17, 11:41 pm, Jacob <[email protected]> wrote: > For what it's worth, it also looks like I assumed (foolishly) that PHP > was treating strings the same was JS was, but I was > wronghttp://stackoverflow.com/questions/949604/json-parse-error-with-doubl... > Jacob > > On Apr 17, 11:29 pm, Jacob <[email protected]> wrote: > > > > > I think i found my issue - even though im not even sure how this fixed > > anything... > > > var jsonSearchSettings = {'search' : query}; > > jsonSearchSettings = JSON.encode(jsonSearchSettings); > > console.log(jsonSearchSettings); > > > worked like your example in jsFiddler, Sandy, but this > > > var jsonSearchSettings = JSON.encode({'search' : query}); > > console.log(jsonSearchSettings); > > > output the double quoted string...i think i might just falling asleep > > at the helm here, and need to step away from this code. > > Im baffled. > > > On Apr 17, 11:09 pm, Jacob <[email protected]> wrote: > > > > Interesting, when I use your example with jsFiddle there are no > > > wrapping quotes (which is good), but when I use Firebug directly to > > > return JSON.encode({apple: 'red', lemon: 'yellow'} it comes wrapped in > > > double quotes, which mirrors what im seeing on my server side code. > > > > I dont understand whats going on... > > > > On Apr 17, 10:59 pm, Sanford Whiteman <[email protected]> > > > wrote: > > > > > > -- but instead in firebug I get this > > > > > "{"apple":"red","lemon":"yellow"}" > > > > > Can you show this in a jsFiddle? > > > > > I see no such anomaly here > > > > > http://jsfiddle.net/Drm9F/ > > > > > and such a bug would be causing wide-ranging problem if it existed in > > > > a basic environment. > > > > > It's surely something about the way you are reencoding the data before > > > > putting it on the wire, not JSON.encode(). > > > > > -- Sandy > > > > > -- > > > > Subscription > > > > settings:http://groups.google.com/group/mootools-users/subscribe?hl=en
