Using ActiveObjects as my ORM and Gson as my JSON processor.
Ran into a problem going toJson from
persisted objects. The problem is that my persisted class is actually
an Interface and AO is proxying that object under the hood. Here's
some sample code:
Venue venue = manager.get(Venue.class, id);
gson.toJson(venue);
Comes ...
For example we want to be able to give our vendors javascript code and once embedded, it would show a badge on their site and show how long they have been doing business with us.
Thank You
...
I have a JSON object that looks like this.
[
{
"id" : "23", "event_id" : "0", "sport_title" : null, "event_title" : null, "title" : "Under 1 day!",
"content" : "It\\'s all hotting up and battle commences in under one day!", "link" : ""
},
{
"id" : "20", "event_id" : "0", "sport_title" : null, "event_title" : null, "title" : "Getting E...
I am trying to use a nested ajax call to populate a table, and once the table is built, use jQuery's dataTable plugin to pretty it up.
The problem I am running into is an order of operations question. When do I call the dataTable function so that I can be assured that the table is built AFTER the values are populated? When I try the f...
I have a set of checkboxes with multiple choice allowed. I parse the set this way:
if ($("input[name='route_day']:checked").length > 0) {
$("input[name='route_day']:checked").each(function(){
if(this.value != null)
route_days_hook.push(this.value);
});
dataTrap.route_days = $.JSON.encode(route_days_hook);
}
...and pu...
I get back a JSON response from a social networks site. There are certain accented characters that I would like to be removed.
An example is : L\u00e1szl\u00f3 M\u00e1rton, that reads "László Márton" and I would like to be transformed into Laszlo Marton.
I would like to keep the JSON format intact, as I will send it towards.
How can I...
TLDR:
Started with this question simplified it after got some of it working and continuing it here.
I need to 'GET' the JSON array
Format it correctly and for each within the array place it in the corresponding DIV.
??
It works.
This is a followup from this question to simplify and continue.
I need to some complicated JSON data f...
Hi,
I have a login control on my homepage (http://www.xyz.com) which makes a JSON login request over HTTPS (https://www.xyz.com/json.ashx). This seems to work fine in Firefox and IE7. But IE8 gives a 'permission denied' error for jquery.min.js
I have verified that this call works fine if its solely over http or https.
Is the call cons...
So I'm trying to use Google Map suggest API to request place name suggestions. Unfortunately I can't find the docs for this bit.
Here is an example URI:
http://maps.google.com/maps/suggest?q=lon&cp=3&ll=55.0,-3.5&spn=11.9,1.2&hl=en&gl=uk&v=2
which returns:
{suggestion:[{query:"London",...
I want to use this ...
Hi,
I have been searching for a way to get the json data from a URl (for example: http://search.twitter.com/trends.json) and display it in a listview. Couldnt get a perfect example to get it done. Can anyone plz help me out by getting the solution and providing a good example of how to do it...
...
Hi i've got a problem evaluating json. My goal is to insert json member value to a function variable, take a look at this
function func_load_session(svar){
var id = '';
$.getJSON('data/session.php?load='+svar, function(json){
eval('id = json.'+svar);
});
return id;
}
this code i load session from php file that i've store befor...
i have one issue..
Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘* -[NSCFArray objectForKey:]: unrecognized selector sent to instance 0*c3e6afe0’
stack(29365339.7657656....);
please help issue..
...
I've got a feeling this is going to be something really simple, but anyway. I've got some code that pulls in my latest Twitter statuses - it's pretty much the standard code everyone is using. However, even though the URL I'm using has the count parameter added...it's not limiting the request to 5 statuses. The code works, well, in so muc...
After trying to format my JSON data by hand in javascript and failing miserably, I realized there's probably a better way. Here's what the code for the web service method and relevant classes looks like in C#:
[WebMethod]
public Response ValidateAddress(Request request)
{
return new test_AddressValidation().GenerateResponse(
...
I am designing a RESTful API for a booking application. You can request a list of accommodations. And that's where I don't really know how to design the JSON represenation. This is my XML representation:
<?xml version="1.0" encoding="utf-8"?>
<accommodations>
<accommodation>
<name>...</name>
<category>couch</category...
I'm attempting to parse JSON using jQuery and I'm running into issues. Using the code below, the data keeps coming back null:
<!DOCTYPE html>
<html>
<head>
<title>JSON Test</title>
</head>
<body>
<div id="msg"></div>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$.ajax({
...
I have a JSON containing imbricated arrays, maps and primitive values.
Is there a way to replace a whole map by knowing the key that is set with ?
e.g. in
["a":"aaa", "map1":{"int1":1, "map2":{"int2":2}, "data":null}]
I would like to replace the string representing map2 and get
["a":"aaa", "map1":{"int1":1, "data":null}]
...
Hi folks!
I'm wondering if it is possible to use assigned variables as identifier in a json array. When I tried this, I was getting some unexpected results:
(Code is simplified, parameters are passed in a different way)
var parameter = 'animal';
var value = 'pony';
Util.urlAppendParameters (url, {parameter : value});
Util.urlAppe...
I've done the following tests with JSON requests sent to an ASP.NET 2.0 ASMX web service (using AJAX Extensions 1.0 for ASP.NET 2.0) and it seems that case sensitivity is important in some situations but not in others. See the following examples:
Case matches 100%:
{"request":{"Address":{"Address1":"123 Main Street","Address2":"suite...
I have an html form that has the following structure:
<input type="text" name="title" />
<input type="text" name="persons[0].name" />
<input type="text" name="persons[0].color" />
<input type="text" name="persons[1].name" />
<input type="text" name="persons[1].color" />
I would like to serialize this into the following json:
{
...