json

jQuery cannot retrieve data from localhost

I have a very simple bit of jQuery to retrieve my latest Tweet $.getJSON("http://twitter.com/statuses/user_timeline/username.json?count=1", function(data) { $("#tweet_text").html(data[0].text); }); This works fine on a simple HTML file on my desktop. However, once the file is accessed from my local...

Why is my jQuery jEditable, edit-in-place callback not working?

I am using a jQuery jEditable edit-in-place field but when the JSON function returns and I try to return a value from my edit-in-place callback all I get is a flash of You can see this here... http://clareshilland.unknowndomain.co.uk/ Hit Ctrl+L to login... Username: stackoverflow Password: jquery Although you can see the script in...

Is there a better way to deal with reserved characters when parsing XML/JSON data on the iPhone?

The following code works, but it's ugly and creates a bunch of autoreleased objects. I'm using similar code for parsing reserved HTML characters as well (for quotes, & symbols, etc). I'm just wondering... Is there a cleaner way? NSString *result = [[NSString alloc] initWithString:userInput]; NSString *result2 = [result stringBy...

How to assert/unit-test servers JSON response?

My current project uses JSON as data interchange format. Both Front-end and Back-end team agree upon a JSON structure before start integrating a service. At times due to un-notified changes in JSON structure by back-end team; it breaks the front-end code. Is there any external library that we could use to compare a mock JSON (fixture) w...

is there object generator working on JSON ? (just like XSDObjectGen.exe)

Hello. I have to serialize & desserialize json data. if the data type was XSD, I am able to create class by using XSDObjectGen.exe But , the data type I have to serialize is 'JSON'. Is there any good way to generate class for serialize & deserialize ? ...

ExtJS combo setting problem

Hi I run into an interesting problem while was using combos in input form. My form contains combos that get data from json stores. It works fine when adding new record, but when the form is opened for editing an existing record, sometimes the id appears as selected not its value (eg: there's 5 instead of "apple"). I think it tries to se...

HTML form requirements specification

I am building a framework that will validate forms both client-side (javascript) and server-side based on a form requirements specification written in json. The purpose is to get rid of logically equivalent code on the server and client to make the code more maintainable, faster to write, and less buggy. The specification format may ...

What's the difference between 'json" gem and 'json_pure' gem?

I need a library to handle JSON objects in Ruby. There are two gems available json and json_pure on http://rubygems.org/search?query=json json_pure is written only in Ruby while json is using C. All I understand is that json is faster because of the usage of C. So is json better for production? Both seem to be easily installed just by ...

Possible to configure Jackson-Json Mapper to exclude properties based on which object it is serializing?

Say I have objects such as a Business with a List of Address objects, and an Order that has a Business. Is it possible to configure so that when the Order is serialized it excludes the list of addresses from the Business object, and when the business is serialized it includes the list? I'm using ajax to pull data for an RIA and when wo...

How to use jquery to paginate json data?

Duplicate: Paging Through Records(json data) Using jQuery… Good jquery pagination plugin to use with json Data… My json Data looks like this {"Table" : [{"Emp_Id" : "3","Identity_No" : "","Emp_Name" : "Jerome","Address" : "Madurai","Date_Of_Birth" : "","Desig_Name" : "Supervisior","Desig_Description" : "Supervisior of th...

Reading JSON with JQuery

Hello, I am using JQuery to execute an operation within a web service. After writing data back to my databaes, the service returns a JSON response. My request looks like the following: $.ajax({ url: "/services/myService.svc/PostMessage", type: "POST", contentType: "application/json; charset=utf-8", data: '{"message":"testing","...

Sinatra, JavaScript Cross-Domain Requests JSON

I run a REST-API build on top of Sinatra. Now I want to write a jQuery Script that fetches data from the API. Sinatra is told to response with JSON before do content_type :json end A simple Route looks like get '/posts' do Post.find.to_json end My jQuery script is a simple ajax-call $.ajax({ type: 'get', url: 'http://api....

Getting JSON data in PHP

I have a JSON data like this: { "hello": { "first":"firstvalue", "second":"secondvalue" }, "hello2": { "first2":"firstvalue2", "second2":"secondvalue2" } } I know how to retrieve data from object "first" (firstvalue) and second (secondvalue) but I would like to loop trough this object and as a result get values:...

How can I use json module in google app engine ?

json module was added in python 2.6 but GAE supports 2.5 only. How can I use it there? ...

jQuery $.getJSON - How do I parse a flickr.photos.search REST API call?

Trying to adapt the $.getJSON Flickr example: $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&amp;tagmode=any&amp;format=json&amp;jsoncallback=?", function(data){ $.each(data.items, function(i,item){ $("<img/>").attr("src", item.media.m).appendTo("#images"); if ( i == 3 ) return false; ...

qooxdoo json/request transport method

Hi all, I try to send a request to my server via GET, but qooxdoo sends request as OPTIONS. Is any way to change this behaviour? I try to use qx.data.store.Json (url) and qx.io.remote.Request (url, "GET", type) but result is same in both cases. My version of qooxdoo is 1.0.1, browsers are FF 3.5.6 and Chromium 5.0.361. ...

Convert JSON structure

I have a set of data in one JSON structure: [[task1, 10, 99], [task2, 10, 99], [task3, 10, 99], [task1, 11, 99], [task2, 11, 99], [task3, 11, 99]] and need to convert it to another JSON structure: [{ label: "task1", data: [[10, 99], [11, 99]] }, { label: "task2", data: [[10, 99], [11, 99]] }, { ...

How to Compress JSON with ASP?

I have a large JSON data string that's 757KB. I tried GZIP'ing it, which successfully reduced file size down to 143KB. But, in it's GZIP'ed state, my JQUERY function can't make use of the compressed JSON data. Any suggestions on how to compress JSON in an IIS/ASP environment and still be able to use the JSON data in a JQUERY function?...

AJAX Post of JavaScript String Array to JsonResult as List<string> Always Returns Null?

I'm trying to build up a string array in JavaScript and get the results in a string list in the action method. Below is what my JavaScript looks like. I'm using jQuery 1.4.2. The problem is my List in the action method is always showing NULL. Will a JavaScript string array not map correct to a string list in C#? var test = ['tes...

Deserializing JSON with JavaScriptSerializer C#

I am experimenting with JavaScriptSerializer to deserialize some JSON in C#, and have a couple of questions regarding the use of DataMember. I want my DataContract class to have a property called "Parts" that maps to a JSON object "rings". If I set the DataMember Name="rings" and name the property "Rings" everything works as expected....