Hi.
I am working in GWT. Currently my requirement is simple. I want a JSON in following format:
{":question" : { ":id":"123", ":question_text":"some text", ":nodes":["123","111"]}}
I need to create an object in GWT code such that when I use jquery's json plugin to parse that object; I should get above listed json. This json needs to ...
I have a web method called from Jquery to display a hierarchical tree object. The return value is a List (Of T) , where T is hierarchical, a parent-child relationship. traversal will be from parent to child.
1) .Net automatically converts the return value from webmethod to JSON to send it back to js client. At that point it throws a ci...
how can we read a JSON object in a JSP , Servlet or in any other java program?
...
This is probably a no-brainer, but how can I make this happen:
var name = otherObject.name; //"string"
var o = {
name : otherObject
};
alert(o["string"].name);
Thanks in advance!
...
OK, so my datasource is serving json and it's UTF8 encoded. Viewing the json result in the browser or Firebug confirms this. But when the YUI datatable displays the results in a table the UTF encoding is lost, resulting in G�teborg instead of Göteborg
I see according to the documentation provided by Yahoo that you can specify the conn...
I'm using a Json.NET library. What's the most convenient way of serializing/deserializing arrays in JSON via C#? For example, I'm trying to deserialize the following text (reading from file):
{
"Name": "Christina",
"Gender": "female",
"Favorite_numbers": [11, 25 ,23]
}
I'm reading the text above from file to a variable:
J...
I'm experiencing an error that I haven't been able to find any mention of anywhere. I'm developing an AJAX-enabled WCF web service with ASP.NET. In my ASP.NET master page's , I included the json.js file, copied fresh from json.org. When I run the page, it fails (VS 2008 catches a Javascript exception) on the first line of code in json.js...
I have made a jQuery based widget which is configured a bit like this:
jQuery("#foo").widget("service", {
output : "test_output_field",
parameters : {'format' : 'json',
'limit' : 20,
'services' : {'service1' : {},
'service2' : {'language' : 'en', 'type' : 'solid', 'parent' : 'father'},
'service3' : {...
Why is there a for(;;); preamble in facebooks JSON responses?
...
Hi, I just read this article at Smashing Magazine (http://www.smashingmagazine.com/2009/11/21/zen-coding-a-new-way-to-write-html-code/) about Zen Code. Maybe there is any jQuery plugin for this? Might be good for json data inserting/templating.
...
Hi,
I have a string with a floating point number in it, but I can't get JSON to load it as a decimal.
x = u'{"14": [4.5899999999999999, "susan"]}'
json.loads(x, parse_float = decimal.Decimal)
This returns:
{u'14': [Decimal('4.5899999999999999'), u'susan']}
Any idea how I can make it into the actual "4.59"?
...
Hi,
I'm using the following code to request data from an ASP.net MVC application. I'm also using TcpTrace so that I can see the request/response.
if (isInteger($('#txtDay').val()) && isInteger($('#txtMonth').val()) && isInteger($('#txtYear').val())) {
$.ajax({
type: 'POST',
contentType: 'application/json; charset=u...
Given a Unicode string and these requirements:
The string be encoded into some byte-sequence format (e.g. UTF-8 or JSON unicode escape)
The encoded string has a maximum length
For example, the iPhone push service requires JSON encoding with a maximum total packet size of 256 bytes.
What is the best way to truncate the string so that...
I am actually successfully running a production website with ASP.NET MVC under Mono in a Ubuntu LTS Linux. This server is located somewhere in the cloud and it rocks!
Today, I have tried to make it all work with ASP.NET MVC 2 Preview 2, which can be found here: ASP.NET MVC 2 Preview 2
I have downloaded the source code because I wanted ...
I am parsing a JSON file.
After getting the NSDictionary, I parse the objects in the dictionary into an array of objects. However, for certain JSON files, I get NULL, which should be fine, but it crashes my app for those place where I am expecting something but getting null:
- (id)initWithDictionary:(NSDictionary *)boxDictionary {
if ...
I'm using jQuery's ajax function to hit a cross domain url. The url will return json. I'm in the discovery phase with this but I think, because the json values contain several '"' strings, the json eval is throwing an error and stopping the execution of my client side script. The error that I get is "unterminated string literal". I k...
I have a dictionary containing a JSON response and a plist file. I want to update the values in my plist file with the JSON response values. How would I do this?
...
Hi,
I have this jquery code to output the entries in a JSON file on page load...
$.getJSON('b.json', function(data) {
$('#dictionary').empty().hide();
$.each(data, function(entryIndex, entry) {
var html = '<div class="entry">';
html += '<h3 class="title">' + entry['title'] + '</h3>';
html += '<d...
I have a form with a collection of Html and ASP Server Controls. Im using JSON to preload some drop-down lists.
I want to maintain the states of these drop-down lists on postback. Im quite new to JSON, can anyone help?
...
Hiya i was wondering if anyone can point me in the direction of examples or sample code for a few things regarding table minipulation i'm trying to achive but haven't been able to crack yet.
I currently have a table of data being produced that is sorted and displayed using Tablesorter plugin for Jquery.
I would like to add these extr...