json

Worrying about scalability of a new site

I am building a webapp that has the following characteristics: It only has a small number of pages, home,contact us, about,singup,etc. Each user has one jquery-based page that allows them to drag/drop/manipulate DOM elements. When a user has finished manipulating elements they can hit Save and elements are sent via JSON to a PHP script...

How to use Json in asp.net 3.5?

Can someone please give some fair idea about how to use JSON? ...

ExtJS combobox jsonDataStore

var remoteLookupJsonStore = new Ext.data.JsonStore({ root : 'records', baseParams : { column : 'fullName' }, fields : [ { name : 'name', mapping : 'fullName' }, { name : 'id', mapping : 'id' } ], proxy : new Ext.data.ScriptTagProxy({ url : 'LookupLoader.ashx' //url: 'http://tdg-i.com/dataQuery.php' similar data }) }); ...

Content negotiation ignored when using browser Back button

Here's the situation: I have a web application which response to a request for a list of resources, lets say: /items This is initially requested directly by the web browser by navigating to that path. The browser uses it's standard "Accept" header which includes "text/html" and my application notices this and returns the HTML content...

How can we implement Paging using json, Need the records to be preloaded. Help

I am trying to implement paging in PHP, using Json. I need the data to be preloaded, before the user click next results. Please Give me some suggestions or some references. ...

To consume a RESTful web service in C#, should I use HttpWebRequest?

How do I consume a RESTful web service in C# code? NOTE: by RESTful, I mean non-SOAP. For example, in the flickr API you can call their web service as follows to return JSON data: http://api.flickr.com/services/feeds/photos_public.gne?tags=cats&tagmode=any&format=json Do I simply use HttpWebRequest? What if I'm using a web se...

Circular reference exception when serializing LINQ to SQL classes

I have a set of linq to sql classes and serialized them into JSON using the .NET JavaScriptSerializer. However, as soon as I add record onto a relating table, serialization throws a "Circular reference exception". Aaarggh! It's described in detail here. I have a few options Convert the linq to sql class to a class with no relationsh...

Which word do you use to describe a JSON-like object?

I have a naming issue. If I read an object x from some JSON I can call my variable xJson (or some variation). However sometimes it is possible that the data could have come from a number of different sources amongst which JSON is not special (e.g. XMLRPC, programmatically constructed from Maps,Lists & primitives ... etc). In this situ...

ExtJS grid callback on load and reload

Hello. I have an Ext Grid and want to grab the JSON "success":false/true response an execute a function for each situation. I would like to have it as callback function for every grid interaction with the JSON PHP file. Any examples of this ? Thank you for your time. ...

getJSON Callback Not Firing

I'm learning asp.net mvc by working on a test project including SubSonic and jQuery. The problem that I'm encountering is that every time I want to return something more than a simple string, like a Json object, I get stymied because callbacks don't seem to fire, or come back as failed. My method to get a list of jobs in the database: ...

iPhone, special characters in JSON Response

Writing an iphone app, and I'm getting my data from a REST API that returns JSON. My problem is, some of the data has special characters embedded and Im getting errors. Example: MartÌn Petite-RiviËre-Saint-FranÁois Here is my current code: NSString *jsonString = [[NSString alloc] initWithData:receivedData...

Unable to read array after eval(responseText) + Javascript + JSON + Rails

I pass activerecord data from rails to JavaScript function as JSON using ajax. my request.responseText looks like this [{"site": {"lng": 55.1443, "lat": 25.0608}}, {"site": {"lng": 55.1065, "lat": 25.0399}}] Below is my JavaScript code var sites=eval('(' + request.responseText + ')'); for (var i = 0 ; i < sites.length ; i++) { ...

Avoid iPhone constant polling a web-service?

I have an iPhone application that needs to be updated as soon as a change is made to the server. How can I have the server "push" data to the iphone rather than the iphone constantly polling the web service? EDIT: I want th iPhone to receive JSON updates as soon as the server processes them, without having to request. I suppose since t...

How to parse the JSON response in Blackberry/J2ME?

Hi, I want to parse the response coming from the server in JSON format. I have done some googling but i can't find any library or jar kind of thing. Everywhere there is provided open source code as zip file. How can i achieve this? if there is no jar available for blackberry then how to use that open source code in my application?? T...

Partial Views vs. Json (or both)

I use ASP.NET MVC with jQuery and have a lot of Ajax requests to my controllers. Use Partial Views (usercontrols) to build the intial view when a page is loaded. Then if I need to append/replace data based on my Ajax request I build HTML from the Json response. This approach gives me full control, ie. I can get extra information back f...

How do you deal with authorisation on actions that return results other than ViewResult?

I am using a custom authorization filter on my ASP.NET MVC controllers that redirects the user to a url other than the login screen if they fail authorisation on a particular action. This is ok for actions that return views, but many of my actions return other result types such as PartialResult or JsonResult. My current filter looks li...

JSON parsing with JsonResult and JavaScript

Environment: ASP.net MVC: Given anonymous structure as such: var test = new { name = "me", age = "100" }; that then gets parsed as result = Json(test) data = result.Data // Comes back with { name = "me", age = "100" } Which then gets successfully passed into a JS function, how do I go about using that as a JSON object, s...

Problem parsing JSON result with Prototype

My service returns the following JSON object, with the Content-Type header set to "application/javascript". It's wrapped in parens per instructions at json.org][2], but I've tried with and without parens. Without parens, it passes verification from jsonlint. ({"products": {"itemId": "0", "productId": "1234", "quantity": "4", "rank": "12...

How to wait for $.getJSON()?

I have this problem where I do an .each() on this group of selects, for each one it fires off a call to the server for some data to populate it with. However I couldn't figure out why it would only populate the bottomest one. Then I threw in some alerts() and realized it was only running the call back function on the last one multiple ti...

JSON library for C#

Does Microsoft provide any library to work with JSON in C#? If not, what open source library do you recommend? Thanks. ...