I send json_encoded data from my PHP server to iPhone app. Strings containing html entities, like '&' are escaped by json_encode and sent as &.
I am looking to do one of two things:
make json_encode not escape html entities. Doc says 'normal' mode shouldn't escape it but it doesn't work for me. Any ideas?
make the iPhone app un-es...
I'm working on a form that lets folks choose their preferred methods of contact. Among other things, the form consists of 9 checkboxes (3 sets of three) that I'm trying to store in my database as JSON.
Here's the pertinent parts of the form...
<h1 style="padding-top:25px;">Communication Preferences</h1><hr />
<div class="onethird cont...
Dear friends ,
I want to call a web service method in javascript. (asp.net 3.5)
I have traced the result with firebug .
here is the result:
{"d":"[{\"TI\":\"www\"},{\"TI\":\"www1\"}]"}
I think the correct result should like this
{"d":[{\"TI\":\"www\"},{\"TI\":\"www1\"}]}
what is the quotation before and after the Bracket ?
...
Hey all,
I'm trying to create a feed using jquery ajax and requesting data from facebooks social graph using json method.
Can someone please tell me why it isn't working? i've tried $.getJSON(); to no luck!
This is the code I have just tested and still no luck:
$(document).ready(function(){
var url = "http://graph.facebook.co...
I am working on a web application that gets JSON data from the server (Ruby/Rails) into the client using jQuery/ajax and then renders it to the browser using jQuery to populate the DOM. To simplify access to my data on the client side, I would like to use an object-relational mapper similar to ActiveRecord, but which starts with JSON dat...
Hi,
I've been tasked with creating an iPhone app which will tap into a series of REST API JSON feeds from Twitter.
I'm somewhat new to iPhone development, but I've created a few apps before, though none of them required tapping into API data.
So let's say we have 3 views in Interface Builder that are being controlled by a tabcontrolle...
This is slightly different from the question titled "Error about ‘invalid JSON’ with couchDB view but the json’s fine": I am not trying to upload a file only enter a simple document.
The example I am trying to use is actually from O'Reilly's book "CouchDB: The Definitive Guide" and I am pretty sure that I have tried it before and got i...
I'm looking to retrieve json from a dedicated server. It will be used to verify client to server communications in my Ajax monitor application.
[EDIT]
LOL! Even I couldn't of begun to answer this vague question.
Sorry was in a rush when asking question.
Context:
The ajaxMonitor program wraps the JQuery.ajax function. It is a plug-in...
I just learned about jquery's .makeArray and I am trying to use JSON.stringify to store the array in localStorage but I am having unexpected results.
This works:
var links = {'one': 1, 'two': 2 };
var setstr = JSON.stringify(links);
localStorage.setItem('strlinks', setstr);
var getstr = localStorage.getItem('strlinks');
console.log(ge...
Hi all,
I am building a Railo app which deals with a lot of JSON data sent back and forth via Ajax. I've identified an opportunity to optimize its performance, but I'd like to hear some advice from the community before I tackle it.
Here is a good example of the situation.
I have an action on the server that queries a set of bid respon...
I tried to use this soln (which uses this file) to convert GAE db model to json. But when I tried to use it, I got this error "TypeError: datetime.date(2010, 7, 27) is not JSON serializable"
Does anyone know whats the problem?
Or, if you know alternative soln to convert GAE db model to JSON please suggest so.
...
Hello all
I've an XML object converted into the following JSON object
"{"?xml":{"@version":"1.0","@encoding":"utf-8"},"Response":{"Users":null,"Messages":{"Tell":{"Notify":{"@From":"abc","@Message":"hi system, its abc<br/>"}},"Group":null},"PersistedMessages":{"Tell":null,"Group":null}}}"
How can i get the values inside the xml nodes...
Hi,
I am trying to use getJSON to submit username and password to a webservice and alert "hi"
This is my code:
$.getJSON(address+"?format=json&jsoncallback=?", {CustomerEmail: email, Password: password},
function(){
alert("hi");
});
The http headers submit a 200 message so it should be OK but it does not enter the function, ...
Using Facebook Search API, I got an response like:
"data" : [
{
"created_time" : "2010-07-24T19:47:31+0000",
"description" : "...",
"icon" : "...",
"id" : "1",
"link" : "...",
"name" : "...",
"type" : "link",
"updated_time" : "2010-07-24T19:47:31+0000"
},
{
...
Hey everyone,
I have a mysqli query which i need to format as json for a mobile application.
I have managed to produce an xml document for the query results, however i am looking for something more lightweight. (see below for my current xml code)
Any help or info greatly appreciated people!
$mysql = new mysqli(DB_SERVER,DB_USER,DB_PA...
There are a whole bunch of tutorials out there explaining how to do this, eg here and here.
Looks real easy huh? Yet I've still somehow managed to waste half a day on it without getting anything working.
Eg: the following works absolutely fine
public ActionResult FindStuff(string q)
{
return Content("test");
}
$('#MyTextBox').aut...
I have the following problem. My App (a prototype of an api) should be able to react on params (like language).
I'm already able to respond to an request by sending an entierly object (with associated objects included) as JSON. But now i want to select the associated objects by parameter.
my code:
object.to_json(include => {
:texts_...
Lets say I have two types of documents stored in my CouchDB database. First is with property type set to contact and second to phone. Contact type document have another property called name. Phone type have properties number and contact_id so that it can reference to contact person. This is trivial one to many scenario where one contact ...
Here's a simple ActiveResource class. It has some instance variables and maybe even some methods, but it's not backed by any data.
ruby-1.8.7-p299 > class Box < ActiveResource::Base;
attr_accessor :a, :b, :c, :d;
end
=> nil
Let's populate it:
ruby-1.8.7-p299 > bx = Box.new; bx.a = 100; bx.b = 20...
What is the preferred way to do AJAX.
If it was for a search page written in PHP using Jquery for the AJAX
How would you handle the response
a) Have the response contain all the relevant html/styling
or
b) Send pure JSON and have a javascript function build the html/styling around the javascript variables.
I can see advantages to ...