json

basic json > struct question ( using 'Go')

I'm working with twitter's api, trying to get the json data from http://search.twitter.com/trends/current.json which looks like: {"as_of":1268069036,"trends":{"2010-03-08 17:23:56":[{"name":"Happy Women's Day","query":"\"Happy Women's Day\" OR \"Women's Day\""},{"name":"#MusicMonday","query":"#MusicMonday"},{"name":"#MM","query":"#MM...

How do I catch JSON parse errors with JQuery JSON calls?

I'm making AJAX calls to a server that sometimes return unparseable JSON. The server isn't under my control, so I can't fix that. function eventFunction(evt) { $('div#status_bar').show(); $.ajax({ url: 'http://buggyserver.com/api/', type: 'GET', data: { 'mode': 'json', 'q': 'get/data' }, dataType:...

GWT JsonpRequestBuilder Timeout issue

I am getting time out from using JsonpRequestBuilder. The entry point code goes like this: // private static final String SERVER_URL = "http://localhost:8094/data/view/"; private static final String SERVER_URL = "http://www.google.com/calendar/feeds/[email protected]/public/full?alt=json-in-script&callback=insertAgenda...

Java 6 ScriptEngine and JSON.parse problem

The Rhino release that is included in Java 6 ScriptEngine does not have a JSON parser. I've tried including crockfords JSON2.js in my script on the scriptengine.eval(). When I try to do the JSON.parse, it ends up giving me a script error that .replace is an unknown function. .replace is referenced several places in JSON2, and it works ...

json ihttpmodule compression

Hi, I wrote an IHttpModule that compress my respone using gzip (I return a lot of data) in order to reduce response size. It is working great as long as the web service doesn't throws an exception. In case exception is thrown, the exception gzipped but the Content-encoding header is disappear and the client doesn't know to read the excep...

Is JSON array parsable? (Stream parser)

I have a YQL query that extracts data from a page and returns it to my script as JSON. The JSON is huge, and as such, here's my question: Is JSON array parsable? So that I can iterate over the entire JSON structure? ...

Converting a PHP associative array to a JSON associative array

I am converting a look-up table in PHP which looks like this to JavaScript using json_encode: AbilitiesLookup Object ( [abilities:private] => Array ( [1] => Ability_MeleeAttack Object ( [abilityid:protected] => [range:protected] => 1 [name:protected] => MeleeAttac...

Fbml Appllication - Select friend and Post a news on friend's wall - New method

I'm a newbie facebok developer from Italy Sorry, but my english is very poor. I would like to ask you how to create in my facebook application a multi-friend selector to allow my users to post news on friend's wall. How can I let my user select friends, and than send to those friends a news on their wall? I 'don't know ajax, so please c...

Don't want to JSON serialize the whole list of classes

Hey, I've got a IList of Sites in my application and Site has a large amount of properties. I'm wanting to convert this list to JSON to be used in a dropdownlist similar to this var sites = SiteRepository.FindAllSites(); return new JsonResult() { Data = sites, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; the problem...

ASP MVC Controller Method not always called from $.getJSON request

I have a controller method that returns a jSON object and in one calling situation, it works and in another calling situation, it does not work. When the URL in my browser is this: http://localhost:65247/Client -- it works. But, when my url looks like this: http://localhost:65247/Client/UserAdmin?id=6 -- it DOES NOT work In a nutshel...

jQuery + JSONP return data empty?

Hi - I need to access data on a subdomain I've been trying to use JSONP which jQuery has support for. The data that I'm accessing on the subdomain is a static (regenerated) .json file (http://www.example.com/data.json) I was running into "Invalid Label Error" errors and realized the data needed to be wrapped in parenthesis and use ?ca...

Data contained in an array/json, want to inject into page via DOM, does jQ have templates?

Say I have an array, that contains data that I want to display in a html table. (sort of how gmail has all the data in js objects) I have this data in an array so I can do ajax type operations like updating/deleting/sorting of the data. Does jQuery have templates where I can create a template for a given row, and then just loop through...

PHP json_decode() returns NULL with valid JSON?

I have this JSON object stored on a plain text file: { "MySQL": { "Server": "(server)", "Username": "(user)", "Password": "(pwd)", "DatabaseName": "(dbname)" }, "Ftp": { "Server": "(server)", "Username": "(user)", "Password": "(pwd)", "RootFolder": "(rf)" }...

Generating very big options list inside select box from jSon

Performance issue, when generating around 800~ options from jSon object via javascript. Any suggestion, what to change or use, to remove those freezes, when new list is generated? Using jQuery. http://www.copypastecode.com/24016/ Thanks. ...

jqgrid with JSON input rendering empty

I'm trying to generate a jqgrid which populates from a JSON feed, being output from a django backend. The python handling the request is as follows: from django.http import HttpResponse from django.utils import simplejson def json_test(request): results = {'total':'1', 'page':'1', 'records':'2', ...

Convert codeigniter query to json?

I want to convert a model query to json with json_encode, it doesn't work. But with a ordinary array it does. $arr = array("one", "two", "three"); $data["json"] = json_encode($arr); Output <?php echo "var arr=".$json.";"; ?> var arr=["one","two","three"]; But when I try to convert a query codeigniter throws an error. Wh...

jqgrid with asp.net webmethod and json working with sorting, paging, searching and LINQ -- but needs dynamic operators

THIS WORKS! .. but still needs one more thing... Okay, so this is both a "comment" and question. First, is the working example that may help others in search of a asp.net webmethod / jqGrid approach. The code below completely works for sending/receiving JSON parameters from and to jqGrid in order to have correct paging, sorting, filteri...

JavaScript and JSON array

I am trying to understand how a single and multidimensional javascript array would appear in JSON. Can anyone help me with an example for each? ...

change column header text on a JQuery Flexigrid?

I have a jquery flexigrid that I'm dynamically changing so that it displays different tabular data. I want, along with changing the data source (via the 'url' which I'm doing successfully), to change the table column header text but can't quite figure out how to do so. So, for example, I want one flexigrid table to display the 'employee...

Parsing nested JSON objects with JSON Framework for Objective-C

I have the following JSON object: { "response": { "status": 200 }, "messages": [ { "message": { "user": "value" "pass": "value", "url": "value" } ] } } I am using JSON-Framework (also tried JSON Touch) to parse through this and create a dictionary. I want to access the...