json

Loading Flexigrid for jQuery with JSON String

Hello There; I am trying to load the Flexigrid by using a JSON String which is returned by a WCF Service. my Service has a public string GetContacts(string CustomerID) method and it returns a Json string. that json string is created from a List object by using System.Web.Script.Serialization.JavaScriptSerializer class. So, my aim is t...

Security and Cross Domain with ASP.NET MVC JsonResult and jQuery

I am using asp.net MVC to develop an application that will have ajax interactions. I have JsonResult methods in the controller returning my json serialized data. So for example when a request is made to http://somesite.com/findwidgets/ mvc serializes the data as json and sends it back. I am using jQuery on the client side to handle the...

How to convert XML to JSON in Python?

I'm doing some work on App Engine and I need to convert an XML document being retrieved from a remote server into an equivalent JSON object. I'm using xml.dom.minidom to parse the XML data being returned by urlfetch. I'm also trying to use django.utils.simplejson to convert the parsed XML document into JSON. I'm completely at a loss as ...

FilteringSelect with a QueryReadStore: selection doesn't stick

I am using a dijit.form.FilteringSelect backed by a dojox.data.QueryReadStore in order to allow the user to select a region (think "auto-complete" mechanism). On each character entered by the user, the QueryReadStore sends a request to the server, awaiting a json list of matching regions (with associated IDs). By the time a short enoug...

Returning a JSON object from a PageMethod with custom formating

Is it possible to format how an object is returned as JSON from a PageMethod? ie. removing the first "d" element from the data, without writing the JSON from scratch. From { "d": { "name": "bob", "email": "[email protected]" } } To { "name": "bob", email: "[email protected]" } ...

Specifying a root node of FormPanel.form.load for dynamic forms

I'm building a dynamic ExtJS form based on JSON data loaded from an ASP.NET web service. The problem I find is that ExtJS expects the JSON in a specific format, ie. { "metaData": { "title": "Testing" }, "data": [], "success": true } When using an ASP.NET web service to return an object as JSON it returns with the first element "d", i...

json and how to work with it

say I have the following json object; {'fname':'john', 'lname':'Locke'} and the following text boxes <input type="text" name="txtFirstName" value="" /> <input type="text" name="txtLastName" value="" /> how do I go ahead and assign these textboxes the values in the json object with jquery? ...

How to convert XML to JSON in Python

I am importing an XML feed and trying to convert it to JSON for output. I'm getting this error: TypeError: <xml.dom.minidom.Document instance at 0x72787d8> is not JSON serializable Unfortunately I know next to nothing about Python. I'm developing this on the Google App Engine. I could use some help, because my little 2 hour hack that...

The *right* JSON content type?

Right I've been messing around with json for some time, just pushing it out as text and it hasn't hurt anybody (I know of) but I'd like to start doing things properly. I have seen so many purported "standards" for the json content type: application/json application/x-javascript text/javascript text/x-javascript text/x-json But which ...

Silverlight WrapPanel Children

What's the best way to add children to a WrapPanel in silverlight? I'm using C# and I'm reading in a JSON Object containing images with thumbnails and related information. The end goal is to have a grid of thumbnails (13 thumbs horizontally across 950px by 6 thumbs vertically). ...

Should my MVC controller really know about JSON?

The JsonResult class is a very useful way to return Json as an action to the client via AJAX. public JsonResult JoinMailingList(string txtEmail) { // ... return new JsonResult() { Data = new { foo = "123", success = true } }; } However (at least according to my first impression) this really isn...

Storing my ObJ-C class online. (amazon web services?)

Okay this is a fairly broad question. This is my first App and I'm not sure the best way to go about this. The app is on the IPHONE. I have a 'Restaurant' class. The restaurant has many different attributes and opening times. I currently store a restaurant in an instance of nsdata (it complies to NSCoding) LOcal storage is easy and I j...

JSON as a DB export format.

Problem. We log things to a database. To keep disk space usage capped we export from the database to files that can be copied off, or just plane deleted. Some power above me wants to see this as JSON. I see a single JSON files as a single object. So in this case we'd create an object with a list of log messages. Problem is, this fil...

ASP.NET Forms Authentication using third party javascript library

I have a website where I currently use ASP.NET's built in Authentication, profile and role management. I would like to move some functionality (including authentication) to the client side using a third party javascript library like JQuery or Mootools without the use of ScriptManager and generated proxy classes. There is very limited in...

Setting a JSON Object from an input field

I basically have the following flow: XML -> JSON -> Spring MVC -> jsp page, which is displayed as a table with editable fields. How do make is so that when i edit a field value it correct updates the Json Object? I have used some nasty hacking at the moment, as i know (testing) the values/object I am going to get, so im just parsing t...

Adding to an object in JAVASCRIPT

I have a JSON String that I have converted into an object with: data=eval("(" + jsonString + ")"); I can access all the bits and display them with no issues. The question is how do i add to the object. For example: data.car[0].name = "civic"; data.car[1].name = "s2000"; So, if I have an input box to add a new car, how do I a...

MySQL vs File Databases

So I'm going to be working on a home made blog system in PHP and I was wondering which way of storing data is the fastest. I could go in the MySQL direction, or I could go with my own little way of doing it which is storing all of the information (encoded in JSON) in files. Which way would be the fastest, MySQL or JSON files? ...

Passing JSON strings larger than 80 characters

I'm having a problem passing strings that exceed 80 characters in JSON. When I pass a string that's exactly 80 characters long it works like magic. But once I add the 81st letter it craps out. I've tried looking at the json object in firebug and it seems to think the string is an array because it has an expander next to it. Clicking the ...

Returning JSON in GWT

I'm still pretty new to JSON and GWT and I'm trying to figure out how to pass JSON data back from a page into my GWT app. I pass the JSON back to a class: public class GetProductTree extends JavaScriptObject { protected GetProductTree() { } public final native String getCustomerName() /*-{ return this.customername; }-*/; } ...

How to pass multiple parameters in json format to a web service using jquery ?

I'm trying to execute a asp.net webservice using jquery. When I pass only one input parameter it works fine: $.ajax({ type: "POST", url: url, data: "{'Id1':'2'}", contentType: "application/json; charset=utf-8", dataType: "json", success: callback }); but if I try to pass multiple parameters it fails ...