json

charts using php

i need to make charts (pie and bar) and working with php data. the data is JSON encoded. what are the best ways to generate charts. i am right now looking at Google Chart api. is there anything better (read: easier) than this? ...

Help with spring-json using annotated controllers

I've scourged the internet for an example that would use both spring-json and annotated controllers, I'm new to spring so I've had no luck adapting the configuration on spring-json's samples (it uses SimpleController et. al.) Currently I have a controller with 2 mappings, one lists results in html (and works), the other should render js...

how to hide a json object from source code of a page??

iam using json object in my php file but i dont want my json object to be displayed in source code as it increases my page size a lot. this is what im doing in php $json = new Services_JSON(); $arr = array(); $qs=mysql_query("my own query"); while($obj = mysql_fetch_object($qs)) { $arr[] = $obj; } $total=sizeof($arr); $jsn_obj='{"a...

Display my data in jqGrid

Hello, In an ASP.NET MVC application using for the first time jqGrid. I have a menu, I call "employee" from the menu in the master page like this : <script language="javascript" type="text/javascript"> $(document).ready(function() { $(".mnuEmployee").click(function() { $.post("/Employee/Index", null, function(d...

simple marshalling unmarshalling objects

Hello Folks, json support is one of the new features of delphi 2009 and delphi 2010. I want to know if it's there any simple function to marshalling/unmarshalling directly between string and object like in superobject library. Example: MyKnownObject := FromJSON('{name:"francis", surname:"lee"}'); ...

2D array JSON deserializes into a string not an array

How can I deserialize the string of JSON below into a two-dimensional array object using JavaScript? If I use JSON.parse or eval it gets converted to a string. I'm using Douglas Crockford's JSON library. [["Apples", "21529", "22457"], ["Apricots", "12547", "12559"]] ...

loop through JSON result with jQuery

i have the following JSON response, but i am not sure how to properly loop trough it and use. { "ID": 1, "Name": "dept1", "Categories": [ { "ID": 1, "Name": "catg1" }, { "ID": 2, "Name": "catg2" } ] } following code alerts me the departmentID which is 1, then its name 'dept1', then this:...

translation in django fixtures

Here is example initial_data.json. I want let django store value from column 'name' into translation file. So later, when value is printed somewhere, it could use its translated value. Is there any way to do it? Thanks. [ {"pk": 1, "model": "category.category", "fields": {"name": "Report"}}, {"pk": 2, "model": "category.category", "fiel...

How to decode Google spreadsheet's Json respose as a Php Array

My google Docs Spreadsheet call returns this response in the json format (I only need everything after "rows") please look at the formatted response here : ) I use php's json_decode function to parse the data and use it (Yes, I am awful at php) This code returns NULL, and according to the documentation, NULL is returned "if the json can...

Epoch Time (Ticks since 1970) - Mac vs. Windows

I have some C# web services that return JSON. The .NET JavaScriptSerializer returns dates in Epoch Time (milliseconds since 1970). On any Windows machine, the web based application processes the milliseconds back into the proper date without a problem. On my Mac, the dates are sometimes off by 1 hour. Not every time. Only sometimes....

News Feed Database Design Efficiency

Greetings All, I've seen similar questions asked before with no conclusive or tested answers. I'm designing a News Feed system using PHP/MySQL similar to facebooks. Seeing as this table could grow to be quite large -- any inefficiency could result in a significant bottleneck. Example Notifications: (Items in bold are linked objects) ...

Delphi .NET/SQLDirect 6.1: Adding varbinary data in a JSON object.

Hi, I am making a call to a stored procedure which returns varbinary records which I want to store in a JSON object. When I do the same for other data types I use the following TField properties to extraxt the data from the data set: FStoredProc.FieldByName(ColumnName).AsInteger (or .AsString etc) I thought I would be able to use FStor...

Converting JSON to KML

Do you know how can I convert a google walking directions JSON response to KML? I am using this method to get driving directions from Google in JSON format: Google Maps HTTP API for driving and walking directions How can I process this and export it to KML to view it on Google Earth? Is there a Java API or something else? ...

Jsp, Jquery and Json encoded characters issue

Working with JSON is quite new to me, yet I already like it. But i'm facing an annoying issue. Here's how things work: jquery makes an Ajax request for a specific url, this url is a STRUTS action, and, on success, returns a specific jsp this jsp includes JSON taglib (http://www.atg.com/taglibs/json) in order to render proper JSON formatt...

Is there a way to access an object defined on a view in a Master Page in ASP.Net MVC

Hi all, So I've got a partial in my MVC project that creates a JSON array. I want to move this chuck of code from the top of the html page body to the bottom with the rest of the JS for speed reasons. That is to say I want to store the JSON created as a string in C# and access it on the Site.Master. What's the best option here? Thank...

Pass method chains to to_json

I know you can pass methods the values of which you want to be available to json objects like so: # user.rb def name first_name + last_name end # some controller render :json => @user.to_json(:methods => :name) But if I want to massage the value returned from the method a bit (with a text helper say) is there a way to do that? I g...

How to serialize a file in JavaScript?

I want to implement an asynchronous file upload for my asp.net application. My idea is to serialize the file into JSON client-side and call a web service to reconstitute the file server-side. My question is: How do a read a file as binary and serialize it into JSON? The solution can't require the use of Google Gears or "must-install"...

How to get Ajax.Net PageMethod to return JSON

I am using an AJAX.Net to call an ASP.Net PageMethod, which returns JSON serialized JSON data {"d":"[{\"Fromaddress\":\"[email protected]\",\"Toaddress\":\"[email protected]\"},{\"Fromaddress\":\"[email protected]\",\"Toaddress\":\"[email protected]\"}]"} The Response Header states the content type as "Content-Type application/jso...

Wait for getJSON response

i'm trying to make a script using Yahoo's YQL in a web applicaion. The script looks over a text paragraph and then it finds some references and appends on the text as a popup. It all goes fine until I have to loop through each reference with class "verso", after getting my response it appends all the references in the last element of the...

json selecting an item named "item"

I am trying to process a json version of a rss feed but I need to access an array labeled "data.channel.item". I suspect because this name seems to conflict with the reserved word item in javascript, the script doesn't work with only this particular json file. It does work in other cases. Is there a way to use "item" but escape it someh...