json

generating api in json

i am trying to generate a common api for my website!!! i got seperate code for different services like twitter, youtube and flickr!!! can someone tell me how to sort them all together by date???? ...

Getting json data from jQuery AJAX Call on php page

I would like to send data using jQuery ajax API var myData = {"param1" : $('#txtParam1').val(), "param2" : $('#txtParam2').val()}; $.ajax({ url: 'DataService.php?action=SomeAction', type: 'POST', data: myData, dataType: 'json', contentType: "application/json; charset=utf-8", success: ...

DropDown not filling dynamically

I am using following code to populate DropDown: $(document).ready(function(){ $('#inDistrict').sSelect(); $("#inDistrict").change(function(){ $.getJSON("filldistricts.php",{id: $(this).val(), ajax: 'true'}, function(j){ var options = ''; for (var i = 0; i < j.length; i++) { options += '<option value="' + j[...

JQuery/JSON prerequisites

I want to know what are the necessary files are required to attach as a Script while writing JQuery or parsing JSON. In some examples I see developers referencing to: jquery-1.3.2.min.js and some use jquery.min.js. For JSON, some use json2.js. ...

Persist data using JSON

I'm tryping to use JSON to update records in a database without a postback and I'm having trouble implementing it. This is my first time doing this so I would appreciate being pointed in the right direction. (Explanation, irrelevant to my question: I am displaying a list of items that are sortable using a jquery plugin. The text o...

Jquery json parsing for select

Hallo, I have this json: { "ROWCOUNT":5, "COLUMNS":["ID","REGIONE"], "DATA":{ "ID":[1,2,4,3,5], "REGIONE":["Abruzzo","Campania","Emilia","Molise","Toscana"] } I want retrieve value from ID and REGIONE with jquery, to fill a select. I have tried this one: for(var COLUMNS in data) { jQuery.each(data[COLUMNS], ...

Send complex JavaScript object to ASP.Net MVC Action

This seems to be quite a common theme and a few people have given some very constructive answers, but I'm still struggling to get my attempt to work. The problem is much the same as this one for example, except that I'm only trying to send a single complex object instead of an array. My controller looks like this: [AcceptVerbs (HttpVe...

Attaching jsondata to the call of loading a jsonstore in Extjs via POST request

Hi, is there a way to attach jsondata to a POST request for loading a store? I know it's possible through a GET request by simply adding params : {data1 : 1, data2 : 2} on the load call, but I've had no success attaching jsondata. I've tried the following and a few variations of it and no luck. I'm using Extjs 2.2 w/ Alfresco //creat...

How do I make a MVC 2 Json serializable structure with apropriate PK array keys.

I have a table with a Int PK column and a name. I want to load them into an object of some sort and return them using Json() ActionResult in MVC 2. I am having a hard time finding a built-in structure that is supported for serialization that keeps a simple key/value structure in tact. Ultimately I would like to do something like: ...

Intrepreting/Parsing JSON data with jQuery getJSON

I would like to interpret data from JSON feed using jQuery getJSON. $(function() { $.getJSON('http://gdata.youtube.com/feeds/users/raywilliamjohnson/uploads?alt=json-in-script&amp;callback=showMyVideos2&amp;max-results=30', function(data) { $.each(data.feed.entry, function(i, item) { updated = item.updated; ...

Get json values...

Hi, I have search and search the web and also on here.. for loops and all sorts for ways to access a json object like so: [ { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" } ] I want too loop through them an...

Array .push() if does not exist?

How can i push up into an array if neither values exist? Here is my json array/object: [ { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" }, { name: "tom", text: "tasty" } ] If i tried to push again into the array with either name: "tom" or...

Not able to call .php file through JQuery

Below is my JQuery code. I just added an 'alert' to test whether data is retrieved correctly or not. But this code is not working. I think it is simply not able to get inside the file "filldistricts.php". <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.js" /> <script type="text/javascript"> $(...

$.get(u,d,c,"JSON") vs $.getJSON(u,d,c)

I generally use $.get() and $.post() for all of my asynchornous calls, but they're usually qualified with the final parameter being "JSON," indicating that I'm expecting to handle JSON data within my callback. Is there any benefit to using $.get([url],[data],[callback],"JSON") over $.getJSON([url],[data],[callback])? Is it nothing more...

Parsing HTML into JSON

I've been tasked with getting all the SMS updates from this page and putting them into a JSON feed using Yahoo Pipes. I'm not entirely sure how I would get each update, as they are not individual elements, but just a collection of title, etc. Any shared wisdom would be much appreciated! ...

Convert a curl POST request to Python only using standard libary

I would like to convert this curl command to something that I can use in Python for an existing script. curl -u 7898678:X -H 'Content-Type: application/json' \ -d '{"message":{"body":"TEXT"}}' http://sample.com/36576/speak.json TEXT is what i would like to replace with a message generated by the rest of the script.(Which is already w...

Open a popup browser window to select a record.

I want to open a popup window on client PC where I will show records. The user will click on the selected row, and the popup window will disappear, but the parent Form on my page must get filled with the DB values related to the clicked row on the popup. This is what I want to do. What is the right approach? ...

php array usage in javascript, jquery

Using JsonEncode i got the php array in javascript. How i can get the modified array back to php.? ...

How do I call json by its key?

Hi I have in my c# code a class with 3 properties. public class Sender { public string Id {get; set;} public string html {get; set;} public string AnotherField {get; set} } So I have a list collection. List<Sender> test = new List<Sender>(); So I return this as a Json result in my view public Json myView() { return Js...

Which is faster/easier to work with in an iPhone app: XML or JSON?

I am starting to create an iPhone application that will interact with a public API. My question is, which will be faster and/or easier to work with: XML or JSON? ...