I have a seperate .js file and namespace for json requests.
I have another .js file and namespace for the actual logic.
I can't seem to get the result back in my logic layer.
var jsonResult = Blah.Data.LoadAggregates();
alert(jsonResult);
alert(jsonResult.d.length);
alert(jsonResult.length);
all of the above calls are returning unde...
I'm using the AJAX plugin from Andris Valums:
AJAX Upload ( http://valums.com/ajax-upload/ )
Copyright (c) Andris Valums
It works great, except for the fact that I cannot send proper JSON as a response.
I'm setting the headers to 'Content-Type', 'application/json' before sending the JSON-encoded response, and in the plugin I'm sayi...
Hi everyone,
We're in the first steps of what will be a AJAX-based webapp where information and generated HTML will be sent backwards and forwards with the help of JSON/POST techniques.
We're able to get the data out quickly without putting to much load on the database with the help of a cache-layer that features memcached as well as d...
How can I send a JavaScript array as a JSON variable in my AJAX request?
Thank you.
...
Hi,
I'm trying to work on a new project parsing some JSON data for a Silverlight 4 project (specifically created as a "Silverlight Business Application - Visual C#" project) using C# in Visual Studio 2010, and I can't find how to include the references to have parsers and native object support for JSON data.
As far as I know my devel...
In Adobe Flex / Actionscript 3, I would love to pretty print my JSON data to a TextArea. Any libraries out there? A decent search turned up no results. Thanks!
...
There is a conflict with the ShareThis script and another script I have on my site. I've set up a test example here: http://jbrlsr.com/help.html
to reproduce the issue, use FireFox and mouseover a few of the links, you'll notice "Transferring Data From" in the status bar area. To clear that message click on the ShareThis icon.
There i...
So I have an iPhone application that needs to:
Post several strings and up to 5 images (stored in memory) to a RoR web application
Parse the JSON returned that will include several strings and an array of URLs (each representing the location of where the uploaded images can be found on the website).
QUESTIONS:
Can this be done with...
I've read about this a lot and I just can't figure it out. It has nothing to do with MY code, it has to do with the feed or something because if I swap it with a Twitter feed it returns an Object object which is perfect.
$.getJSON('http://rockbottom.nozzlmedia.com:8000/api/portland/?count=1&callback=?',function(json){
console.lo...
Hello -
I am trying to send a GET request to a URL that I know returns data in the form of JSON using python. I would like to know how to send this request to http://someurl/path/to/json, and how to parse it - preferably to a python dict. thanks :)
...
My setup is like this:
Based on this example http://arshaw.com/js/fullcalendar/examples/json.html I tried to get my own fullcalendar application working. I replaced 'events: "json-events.php",' with 'events: "http://localhost:8080/CalendarServletTest/HelloWorldServlet",' and changed the dataType of fullcalendar to 'jsonp'. (The Servlet ...
Any jquery autocomplete plugin which consumes this json format?
{"Table" : [{"ClientName" : "Pandiya"},
{"ClientName" : "Bala"}]}
or how to change the above to
source: ["Pandiya", "Bala"]
...
In the application I am developing, I would like to send messages in the form of JSON objects to a Django Server and parse the JSON response from the server and populate a custom listview.
From the little JSON knowledge I have, I thought this format for the response from server
{
"post": {
"username": "someusername",
"message...
I can't decode json strings like this: "\u0e4f\u0361\u032f\u0e4f"
>>> import simplejson
>>> simplejson.loads('"\u0e4f\u0361\u032f\u0e4f"', encoding='utf8')
u'\u0e4f\u0361\u032f\u0e4f'
However php json_decode works fine:
json_decode('"\u0e4f\u0361\u032f\u0e4f"');
What am I doing wrong?
...
Here is the code I am using to setup the form:
<% using (Ajax.BeginForm("SaveCroppedPhoto", new { Id = Model.memberId.GetValueOrDefault() }, new AjaxOptions
{
OnBegin = "ProfileOnBegin",
...
Hi folks,
i am newbie to JSON & hence i am not sure what $.toJSON(params) means?
Please explain what this does?
TIA
...
My json object looks like:
User { ID: 234, name: 'john', ..);
I want to build a string of all the ID's.
How can I do this? is there a more elegant way than below?
var ids = '';
for(int x = 0; x < json.length; x++)
{
ids += json[x].Id + ",";
}
// strip trailing id
...
I want to create a hashtable of json objects, where each json object represents a user.
I want to do this to sort of create a client side 'cache' of users.
User { ID: 234, name: 'john', ..);
So I can then reference things like this:
if(userCache[userid] != null)
alert(userCache[userid].ID);
is this possible?
...
how can I loop through these items?
var userCache = {};
userCache['john'] = {ID: 234, name: 'john', ... };
userCache['mary'] = {ID: 567, name: 'mary', ... };
userCache['douglas'] = {ID: 42, name: 'douglas', ... };
the length property doesn't work?
userCache.length
...
I have a really simple chat application on a site which works pretty good.
It requests by ajax like this:
$.ajax({
url: "fetch/"+CHAT_SESSION_ID+"/"+LAST_MESSAGE_ID,
dataType: "json",
cache: false,
success: function(data) {
if (data.session_active == 0) { //If other chatter ended session
alert("Session Ended");
}
...