json

extjs: load tree via json returned from Ext.data.JsonStore

Hi All i have a extjs TreePanel that i need to load using json data (cross-domain call) returned from my Ext.data.JsonStore call. That works perfectly. I just cant find a way to use the returned jsonStore to load the treepanel. Any ideas? I am real desperado. Thanks everyone! code snippet: var store = new Ext.data.JsonStore({ roo...

Looking for a JSON library with relaxed syntax

The JSON syntax is very simple but also very strict with names and strings. So i am looking for a JSON library that allows some relaxed syntax for strings. Any token not startng with [0-9],:[]{}" and not is true, false or null is a valid name/string. So that this 2 JSON are equivalent { "name":"Eric", "addr":"461, Ocean B...

Unable to successfully receive JSON data to .NET MVC Controller

Hi, I'm aiming to build up a JSON array of mouse positions and pass them to a controller. For some reason my json is returning from the controller as undefined can anyone spot my problem? // Attempt at declaring a JSON object var personResults = { "answers": [] }; // Onclick I fire in values from mouse event personResults.answers[cou...

Dynamically create an array in Javascript

I have an ajax request that returns some JSON formatted data. I'm building out a Google Maps display with it so I need to take that data and pass it to a few variables. So I want to build an array like: var foo = [ ['A Town', 32.844932, -50.886401, 1, setting1, '<div class="office"><div class="name">Smith</div><div class="location">...

Can I use the Scala lift-json library to parse a JSON into a Map?

Is there a way to use the lift-json library's JObject class to act like a Map? For example: val json = """ { "_id" : { "$oid" : "4ca63596ae65a71dd376938e"} , "foo" : "bar" , "size" : 5} """ val record = JsonParser.parse(json) record: net.liftweb.json.JsonAST.JValue = JObject(List(JField(_id,JObject(List(JField($oid,JString(4ca63596ae6...

ExtJS XTemplate and empty JSON parsing

How do you determine that a JSON object is empty in a XTemplate? I've tried <tpl if="myObject != {}"> <tpl if="myObject"> <tpl if="myObject != undefined"> etc, but can't seem to find the right way to detect an empty object. Thanks. ...

Creating custom objects for wcf

Hi, I have an existing web application that uses EF and POCO objects. I want to improve the client experience by exposing some of my objects through WCF(JSON). I have this working fine but where I am unsure is how to handle derived objects(not sure if that is the correct term) or IEnumerable anonymous objects if you will. Let's say I ...

Javascript : How to get reference to the parent object inside a child object

I have the following code, where i'm unable to get a reference to the parent object inside OnKeyUp function. I understand that in the OnKeyUp method, "this" refers to the textbox. But how do i access the parent object so that var textboxID gets me the correct value ? function $MyObject() { this.Control = { i...

How can I securely accept form data in a jsonp request within my mvc app?

I have a need to accept form data from other web sites to a central MVC application. The form data is just strings of name value pairs and they vary from site-to-site. I plan to concatenate all values and delimit them with a special character. Up to this point, I think I can do this with a JSONP type request using AJAX. What I'm conc...

How to work with a JSON string returned by a remote URL (with Django)?

Hi, i have to build an small app in order to show some data from the Google Financial API. I know that i could study it inside out, but I don't have much time. The url http://www.google.com/finance/info?q=MSFT returns this JSON string: // [ { "id": "358464" ,"t" : "MSFT" ,"e" : "NASDAQ" ,"l" : "24.38" ,"l_cur" : "24.38" ,"ltt":"4:00PM E...

Put jSON encoded array as NSData from NSURLResponse into NSArray

I'm unable to get this to work: NSString *post = [NSString stringWithFormat:@"userudid=%@", [udid stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSLog(@"%@",post); NSData *postData = [NSData dataWithBytes:[post UTF8String] length:[post length]]; //[udid dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES...

convert a json string to python object

Is it possible to convert a json string (for e.g. the one returned from the twitter search json service) to simple string objects. Here is a small representation of data returned from the json service: { results:[...], "max_id":1346534, "since_id":0, "refresh_url":"?since_id=26202877001&q=twitter", . . . } Lets say that I somehow stor...

Trying to use JSON to get cascading DDLs but not getting response

Hello, I'm trying to create cascading DDLs. My aspx page: <form id="form1" runat="server"> <table> <tr> <td>סוג שולחן</td> <td><asp:DropDownList ID="ddlTableType" runat="server" /></td> </tr> <tr> <td>קוד שולחן</td> <td><asp:DropDownList ID="ddlTableCode" runa...

JSON parsing with Newtonsoft.JSON

I have a file in JSON format with record for individual users. Some of the users have a comment field stuck in the middle of their records. I just want to parse top-level items ( fullName contributorName email) using the Newtonsoft.JSON parser, but I can't seem to get it to recognize individual objects. When I parse the whole string int...

Is there a better way to convert a JSON packet into a query string?

I have an input string that will either be a JSON packet, ala: {"PHONE":"555-513-4318","FIRSTNAME":"Austin","ARTISTID":"2","LASTNAME":"Weber"} or a query string, ala: phone=555-513-4318&firstname=Austin&artistid=2&lastname=Weber For my purposes, I need to always use the latter format; so when it is JSON data, I need to convert it t...

filling DDL with JSON return an error but fill the DDL, what am i missing?

Hello all, Here is my code: $("#ddlTableType").live( 'change', function() { $('#ddlTableCode').html(''); var TypeID = $("#ddlTableType > option[selected]").attr("value"); $.getJSON('LoadTableCodes.ashx?ObjectType=' + TypeID, function(TableCodes) { ...

Connecting between iPhone and server

Hi, I am iPhone developer. I have used JSON framework to communicate between iphone and server, send and receive response. But besides JSON, I would like to know more framework that allow us to communicate between iphone and server. Do you suggest some framework? Thanks and best regards ...

use json object in c#

http://xurrency.com/api this webservice is returning a json response message. how can I use this message as an object in my .net project (asp.net web app) ...

Need to make JQuery AJAX request to PHP with JSON array returned and cycled through.

I have a web page that thats sends an Ajax request with a javascript object, using JQuery, to a PHP script which processes the data and then returns a JSON array. I then need to present the first items in the array within a HTML DIV and at the click of a button swap the HTML to present the next items in the array. Here is the PHP scri...

Open specific trail with a url scheme from NSDictionary.

Hi, I am using TouchJSON to retrieve the JSON response from http://enbr.co.cc/TrailsApp/shops.php. In my app I use this code to handle a url scheme. - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { if (!url) { return NO; } NSString *urlString = [url absoluteString]; NSString *urlStrin...