json

JS: Using variable names to call function.

Im working with jQuery. I have an app that makes ajax requests to server that responds with JSON. in some cases the response from the server will indicate the name of a JS function to be called {"responseType":"callback", "callback":"STUFF.TestCallback","callbackData":"this is in the callback"} If the responseType is "callback" as a...

Returning JSON from a PHP Script.

I want to return a .JSON from a PHP script, do I just echo the result? Do I have to set header content-types? Any help would be great! ...

Silverlight: Difficulty with WebClient

I'm having a really weird issue. I must be doing something really obvious that is wrong, but I can't see it. I'm building a wp7 app which currently runs in the emulator. I have a URL that returns JSON. I visit this URL in my browser and verify that it works. I get the data from this URL in Silverlight using WebClient. When I get the re...

How do I parse JSON like geo:point?

I'm trying to parse a JSON response using jquery from last.fm and getting longitude and latitude values. The part of the JSON that holds those values looks like this: "location":{"geo:point":{"geo:lat":"58.409901","geo:long":"15.563306"} The code I got is this: $.getJSON("http://ws.audioscrobbler.com/2.0/?method=artist.getevents&...

rails to_json not following scropes

When I just the to_json method it seems to ignore all other options... any ideas how to fix this? var places = <%=raw @location_for_map.limit(5).to_json(:only => [:name, :lat, :lng]) %>; I'm trying to plug in points from json on a google map, but noticed the points never got smaller with any of my scopes. where, order, limit... I cou...