json

Asp.Net MVC JQuery goodness

I've been developing a simple website using asp.net MVC and I'm starting to add some JQuery\JSON goodness. My problem is up until now all my 'Views' have been strongly typed and I've been building the view based on data from ViewData.Model.MyViewsData. Now once the view has been rendered and I do a Ajax style request I get new data b...

How can I get ASP.NET AJAX to send its JSON repsonse with GZip compression?

I have compression enabled within IIS7 and it works as expected on all responses except for those constructed by ASP.NET AJAX. I have a web service that provides data to the client. When the web service is called directly, it is properly compressed. However, when it is called via ASP.NET AJAX, the JSON response is not compressed. How...

How can I get ASP.NET AJAX to send its JSON response with GZip compression?

Hi - I have compression enabled within IIS7 and it works as expected on all responses except for those constructed by ASP.NET AJAX. I have a web service that provides data to the client. When the web service is called directly, it is properly compressed. However, when it is called via ASP.NET AJAX, the JSON response is not compresse...

Display JSON/YAML hierarchy as a tree in HTML?

I have YAML data that looks sort of like this, but ~150k of it: --- all: foo: 1025 bar: baz: 37628 quux: a: 179 b: 7 ...or the same thing in JSON: {"all":{"bar":{"baz":"37628","quux":{"a":"179","b":"7"}},"foo":"1025"}} I want to present this content in an expandable JavaScripty HTML tree view (examples: 1, 2...

Can I comment a JSON file?

Can I comment a JSON file? If so, how? ...

What's the best C++ JSON parser?

I've seen the C++ JSON links on www.json.org but would like some feedback on which parser people prefer - for reliability, speed and ease of use. Thanks, Sam ...

Can I serve RSS in JSON?

I am writing an RSS feed (for fun) and was looking at the spec here. RSS is a dialect of XML. All RSS files must conform to the XML 1.0 specification, as published on the World Wide Web Consortium (W3C) website. Obviously this means that I am not serving 'pure' RSS if I choose the JSON option. That said, if I conform to the rest of...

How to (de)serialise JSON data in Silverlight using a different name to member variable

I have the following members defined in a class that I'm trying to deserialise: [DataMemberAttribute(Name = "cust_title")] public String Title { get; set; } [DataMemberAttribute(Name = "cust_description")] public String Description { get; set; } For some reason, the deserialisation fails (it seems to ignore the DataMemb...

Favourite AJAX library for classic ASP?

Just wondering if there are any good server-side libraries for AJAX (prefer JSON rather then XML but anything is good) for classic ASP (VBScript)... Rather not reinvent the wheel if it's already working and debugged. Cheers, Gaspard EDIT: Server-side ASP VBScript... I have already seen many javascript client side libraries. ...

jQuery won't parse my JSON from AJAX query

Hi, I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax() To perform the AJAX I'm using: $.ajax({ url: myUrl, cache: false, dataType: "json", success: function(data){ ... }, error: function(e, xhr){ ... } }); And if I return an array of items then it works fine: [ { title: "O...

How to convert DateTime from JSON to C#?

I've got the following class: [DataContractAttribute] public class TestClass { [DataMemberAttribute] public DateTime MyDateTime { get; set; } } Here's the JSON: { "MyDateTime":"1221818565" } The JSON is being returned from a PHP webservice. What I need to do, is convert that epoch string into a valid C# DateTime. What's the be...

How can I access BadgerFish notated attributes using javascript?

I have created a json object from ruby with cobravsmongoose, however the attributes have the '@' symbol in front of them. Whenever I try to access them with standard object notation in JavaScript, such as object.object.object.@attribute I get a parse error. Is there another way to access these objects? ...

What is the correct way to escape text in JSON responses?

I am generating the json from PHP. ...

detecting JSON loaded by browser

Hi, I have an application in which most requests are submitted via AJAX, though some are submitted via "regular" HTTP requests. If a request is submitted and the user's session has timed out, the following JSON is returned: {"authentication":"required"} The JavaScript function which submits all AJAX requests handles this response by ...

Which is the best JSON rewriter for Java?

Which JSON rewriter is the best for applications written in Java? Criteria may vary. I'm personally most interested in stability and performance. ...

php/Ajax - Best practice for pre-loading images

I have put together a script which is very much like the flickr photostream feature. Two thumbnails next to each other, and when you click the next or prev links the next (or previous) two images slide in. Cool! Currently when the page loads it loads the two images. The first time nxt / prv is used then the next two images or previous t...

GWT overlay types, converting to JSON

In GWT, what is the best way to convert a JavaScriptObject overlay type into a JSON string? I currently have public final String toJSON() { return new JSONObject(this).toString(); } Which seems to work fine. I would like to know if there are any better approaches. ...

jqGrid with JSON data renders table as empty

I'm trying to create a jqgrid, but the table is empty. The table renders, but the data doesn't show. The data I'm getting back from the php call is: { "page":"1", "total":1, "records":"10", "rows":[ {"id":"2:1","cell":["1","image","Chief Scout","Highest Award test","0"]}, {"id":"2:2","cell":["2","image","Link Badge","When you are inve...

Handling data in a PHP JSON Object

Trends data from Twitter Search API in JSON. Grabbing the file using: $jsonurl = "http://search.twitter.com/trends.json"; $json = file_get_contents($jsonurl,0,null,null); $json_output = json_decode($json); How do I work with data from this object. As an array? Only really need to extract data from the [name] values. JSON object cont...

How do I make HTTP post request for getting JSON object in response for iPhone application?

I've a web service running on server which return data either in XML format or JSON format. I wanted to request a JSON format but using HTTP Post method. any help greatly appreciated. thanks in advance. ...