json

C# - parsing json formatted data into nested hashtables

I’m trying to work with some json formatted data in C#, but, I’m having some problems determining the proper way to approach the problem. My issue is that the json formatted data will be in an unknown format (I know that sounds odd … please read on). Basically, the json formatted data will be some collection of name/value pairs where t...

Google Maps - Thousands of markers - JSON

In the following example the markers are loaded from a JSON. If there are 20,000 markers the JSON is going to be quite big. Is there any way to send different JSON files according to zoom level instead of sending one huge array? http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/examples/weather_map.html ...

Preferred method to store PHP arrays (json_encode vs serialize)

I need to store a multi-dimensional associative array of data in a flat file for caching purposes. I might occasionally come across the need to convert it to JSON for use in my web app but the vast majority of the time I will be using the array directly in PHP. Would it be more efficient to store the array as JSON or as a PHP serialized...

Telerik RadDock - ajax update returns a JSON error.

Trying to update RadDock (open/close it) by putting it in UpdatePanel however no luck....I'm getting the following response. 189|error|500|Invalid JSON primitive: {"Top":179,"Left":583,"DockZoneID":"","Collapsed":false,"Pinned" :false,"Resizable":false,"Closed":false,"Width":"300px","Height":null,"ExpandedHeight":0,"Index":-1} .| He...

Server Side Google Markers Clustering - Python/Django

After experimenting with client side approach to clustering large numbers of Google markers I decided that it won't be possible for my project (social network with 28,000+ users). Are there any examples of clustering the coordinates on the server side - preferably in Python/Django? The way I would like this to work is to gradually inde...

send json object to jsp

i have a json object in a javascript file. i have to pass this object to a jsp file.the jsp picks up this object and processes it. how can i do it? ...

Erlang vs The Real/Outside world, how to comunicate?

Hello, I'm learning erlang and I'm very fascinated by the mnesia db. I want to build some real world application in C# / F# using erlang as backend. I'm searching for a good solution to communicate with erlang nodes from the outside world. What I found so far: (A) OTP.net, an opensource .net library implementing the 'native' erlang c...

JSON - Framework on iPhone SDK error

I'm getting an error when I run any project with the JSON-Framework installed: Xcode could not locate source file: NSString+SBJSON.m (line: 50) I assumed this means it can't find the sdk, the strange this is that the project builds and runs up until I make my first JSON call: NSArray *data = [responseString JSONValue]; The JSON fold...

Escaped JSON response with [WebMethod]

The JSON response from the following code is wrongly escaped as described below. My webmethod is like this: [WebMethod (Description="doc here")] [ScriptMethod(ResponseFormat=ResponseFormat.Json)] public string responseMyObject() { if (!Setup()) return ""; ... Proxy pu = new Proxy(...); ...

Why does dojo grid need a name column in the json data source

In the following sample data is only shown in the grid if the json data contains a name column -> the first grid shows data, the second not. Why is this the case? index.html: dojo grid <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.3/dijit/themes/tundra/tu...

General purpose json serializer/deserializer in jQuery?

Duplicate: http://stackoverflow.com/questions/191881/serializing-to-json-in-jquery It seems there's a JSON serializer/deserializer built into jQuery, since it's able to implement things like .getJSON . Is it possible to use the built in jQuery JSON processor itself a general purpose JSON processor (ie. make a jQuery.something() call to ...

Convert a JSON object to nested form fields?

Anyone know of a good way to convert a JSON object to nested form fields? For example, given I have the JSON object {'a':{'b':{'c':'1200'}}}, 'z':'foo', 'bar':{'baz':'1', 'id':2}} I should get {'a[b][c]':'1200', 'z':'foo', 'bar[baz]':'1', 'bar[id]':2}; Any ideas? I am currently using jquery and it feels like something like this alrea...

Proper JSON formatting a C# String

If you do this in MVC: var jsonData = new { myimage = "<img alt=\"\" src=\"/Content/images/ShowFPots.png\" />" }; return Json(jsonData); You get this as a value "\u003cimg alt=\"\" src=\"/Content/images/ShowFPots.png\" /\u003e" How do I get this as a value, or will the <> interpret correctly when I add them to the in...

How to use jquery to decode the return json object?

Hi, I trid to use an upload plugin for jQuery. http://valums.com/ajax-upload/ When I set the returning respond type to json, firefox will popup a dialog asking how I like to handle the returning json object. People have asked the same question at the upload script's author's page but no answer so far. Hopefully javascript guys here can...

AR.to_json Works in Console, Fails in Browser

I have this block of code: users = Array.new users << User.find(:all, :conditions => ["email like ?", "%foo%"]) users << User.find(:all, :conditions => ["name like ?", "%bar%"]) users.flatten! users.uniq! puts users.to_json :include => [:licenses] When I run it using script/console, it returns exactly what you would think it should, a...

how do you iterate through an array in fortran?

really simple question. say I have real, dimension(0:100) :: realResults and I want to iterate over realResults, ultimately to create json of the array of the form [[x1,y1], [x2,y2], [x3, y3], ... ] I'm pretty sure I want to use "do" but I'm not sure how thanks ...

Multiple responses from one AJAX request

Not really looking for code examples here, just concepts. I have three sections on a page now that are being updated via three separate AJAX calls to PHP scripts, which return JSON. What would be the easiest way to condense these three calls into one larger call and receive the responses back on the client in JSON? How would I separate...

How do I implement google maps yelp.com style?

I have multiple locations (20+ per page) that need to be mapped on a single map. I would like to click on a link for the location that is not dynamically generated (for SEO purposes) that would open the info window for the respective marker on the map. Behavior should mimic http://maptheburg.com/ - but this map has the sidebar links dy...

C / JSON Library in popular Linux distros?

I have a program written in C that has to input and output JSON over a local domain socket. I've found several C / JSON libraries that 'almost work' through searches. Prior to taking one of the libraries that I found .. I want to be sure that I'm not over-looking a library that is commonly found on modern Linux distros. I'd also really ...

reading a json object in jsp

i have a JSON object passed to the jsp page. it is passed as a string. now i have to parse this string and retrieve the values that are passed through the JSON object. so that i can print the values in the same jsp. ...