Hello, I have the following JSON object:
new Ajax.Request(url, {
method: 'post',
contentType: "application/x-www-form-urlencoded",
parameters: {
"javax.faces.ViewState": encodedViewState,
"client-id": options._clientId,
"component-value": options._componentValue
}
});
Now, I would like to be ...
Hi,
I have a Django model created for Google's App Engine,
Model A():
propA = ReferenceProperty(B)
Model B():
propB = ReferenceProperty(C)
Model C():
propC = ReferenceProperty(B)
I have written custom Django serializer which will fetch the data for the ReferenceProperty(s) and serialize that along the initial model.
The prob...
I'd like to load a JSON feed from an external source using Javascript; what's the best method? I've been working a lot in PHP where it would be easy to do so with file_get_contents or cURL. Is there a related function or process in Javascript?
...
I want to use json with Struts2. However, when I set the action return type to "json", I got "there is no result type defined for type 'json' mapped with name 'success'." Bellow is struts.xml file.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"ht...
I am having trouble deciding if a controller action, which is called by AJAX, should return a partial view, or the "raw" JSON.
Returning a partial view, with rendered HTML makes it easier for the javascript to simply update the current DOM with the returned HTML. However, it does limit what javascript client consuming the webservice can...
I have a Ruby on Rails application and I need to duplicate some computations in both Ruby and JavaScript. Ruby is used in the server side but I also need to compute a students grade on the browser using JavaScript.
My first thought is to build up a JavaScript function using strings, convert it to JSON, ship it to the browser where it i...
Looking over the web, I am finding no answer to this question. I see it being asked and a lot of people being referred to .Net 3.5; however, I am not seeing anything resembling an answer with in the restricted environment of WCF 3.0 (VS2005).
Is it possible for me to do an AJAX/JSON call to a WCF 3.0 Web Service or is the only option t...
Well im trying to return a more complex type than a string or bool but i fail what am i doing wrong?
JavaScript
<script language="javascript" type="text/javascript">
///<Reference Path="~/Script/jquery-1.3.2-vsdoc.js" />
$(document).ready(function() {
// Add the page method call as an onclick handler for the div.
...
I have a JSF application that uses mostly Richfaces. I would like to introduce a more feature-rich grid control, such as the jQuery-based jqgrid. Is it possible to get JSON data from a JSF backing bean? If not, is there an alternative approach?
...
I have array of select tag.
<select id='uniqueID' name="status">
<option value="1">Present</option>
<option value="2">Absent</option>
</select>
and I want to create a json object having two fields 'uniqueIDofSelect and optionValue' in javascript.
I use getElementsByName("status") and I iterate on it.
EDIT
I need out pu...
I have a string in my db I want to pull into my page and convert to a json object.
[
{id: 1,title: "Long Event",
start: new Date(2009, 5, 6, 14, 0),end: new Date(2009, 5, 11)},
{id: 2,title: "Repeating Event",
start: new Date(2009, 5, 2)},
{id: 3,title: "Meeting",
start: new Date(2009, 5, 20, 9, 0)},
{id: 4,title: "...
The code:
function updateDashboardData() {
$.getJSON("includes/system/ajaxDataInterface.php", {recordcount:1}, function(data) {
$('.stationContainer').each(function(data) {
var bsID = $(this).attr("id");
var bsStatus = $(this).children('.stationStatus');
alert(data[bsID][0].time);
bsStatus.find('.bs_maxH...
I'm working on a web based application which uses a JSON over HTTP based API to communicate between the server and the client. The goal being that multiple clients can be developed with different goals (online web client, offline desktop client, or third party created) using the same online data to be shared through this web service.
Ri...
Referring on this question, i have a similar -but not the same- problem..
On my way, i'll have some text file, structured like:
var_a: 'home'
var_b: 'car'
var_c: 15.5
And i need that python read the file and then create a variable named var_a with value 'home', and so on.
Example:
#python stuff over here
getVarFromFile(filename) #t...
Hi
I have downloaded json.net. and added the dll file by clicking Add Reference. The dll file is now appearing in the bin folder.
Now in the code I have tried calling the functions from Json.net
Imports Newtonsoft.Json.JsonReader
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByV...
Hello
I have this php code
$ids = array(1,2,3);
$names = array("cat","elephant","cow");
$originalSettings = array ('ids'=>$ids,'names'=>$names);
$jsonSettings = json_encode($originalSettings);
echo $jsonSettings;
and this is the jQuery code
$.post("ajax.php", {},
function(data){
data.ids.each(function(i) {
alert(dat...
I am using JsonResponse to send some JSON to the client. I would like to test that I am building the correct message for a given input, so it seemed natural to me to parse the resulting JSON and validate against a data structure rather than parsing a string by hand.
Lift's JsObj produces a string which uses single quotes. This is vali...
I have a problem with json data insertion in my DataTable.
Here an example of json data send by server :
{"geneItemList":"{"col":"symbol","qv":"cd4","limit":"-1","start":"0","geneid":"920","name":"CD4"
,"symbol":"CD4","lastupdated":"2009-05-20 10:01:52.0","lastmodified":"2009-05-20 11:12:37.0"}
,...
And here my YUI code :
<script ty...
Hello experts!
I'm trying to make a http request. The code looks like this:
NSString *urlString = [NSString stringWithString:@"http://www.foo.se/bartojson.php?venue=47497"];
NSLog(@"retain %d urlString %@", [urlString retainCount], urlString );
NSURL *url = [NSURL URLWithString:urlString];
[urlString release];
NSString...
Upon clicking on a link, I am bringing in some images from a JSON get, and then when clicking on one of the pictures can get the gallery to appear, but I would like the first image to appear straight away, as an event once the JSON has been loaded. Is this possible?
My code is:
$("#json-get")
.css("cursor","pointer")
.click(fun...