json

How to convert JavaScript literal into JSON array?!

Possible Duplicate: How to count JavaScript array objects? If it's not a JavaScript array, so how to convert it into JSON array? var member = { "mother": { "name" : "Mary", "age" : "48" }, "father": { "name" : "Bill", "age" : "50", "friend": { "co-worker" : "Jake" ...

iPhone JSON Object

Hello, I'm trying to create a application that will retrieve JSON data from an HTTP request, send it to a the application main controller as a JSON object then from there do further processing with it. Where I'm stick is actually creating a class that will serve as a JSON class in which will take a URL, grab the data, and return that o...

Is there a standard syntax for encoding structure objects as HTTP GET request parameters?

Imagine we need to pass a a number structured objects to the web application - for instance, locale, layout settings and a definition of some query. This can be easily done with JSON or XML similar to the following fragment: <Locale>en</Locale> <Layout> <Block id="header">hide</Block> <Block id="footer">hide</Block> <Block...

PHP <-> JavaScript communication: Am I stuck with ASCII?

Hello, I am passing a lot of data between PHP and JavaScript. I am using JSON and json_encode in php, but the problem here is that I am passing a lot of numbers stored as strings - for example, numbers like 1.2345. Is there a way to pass the data directly as numbers (floats, integers) and not have to convert it to ASCII and then back?...

What is a prototype chain in regards to JSON?

Hi all, I'm newer to Javascript, and I was wondering what exactly a "prototype chain" is in regards to Javascript Object Notation? What would I use it for? EDIT: New Question: What are prototypes in Javascript? Thanks! ...

"from _json import..." - python

Hello, all. I am inspecting the JSON module of python 3.1, and am currently in /Lib/json/scanner.py. At the top of the file is the following line: from _json import make_scanner as c_make_scanner There are five .py files in the module's directory: __init__ (two leading and trailing underscores, it's formatting as bold), decoder, enco...

Retrieving data from enumerated JSON sub arrays in Javascript without getJSON

I'm new to JSON and ajax, but i'm trying to access data in an array where the items are enumerated in a sub array within another sub array. I run into problems with I try to access something like data.items[0].details.specs[1].name data.items[0].details.specs[1].id data.items[0].details.specs[2].name data.items[0].details.specs[2].id et...

How to add dimensions to dynamic img elements (Updated)

I use a Json call to get a list of image addresses, then I add them individually to a div like this. Unfortunately the image dimension is not part of the Json information. <div id="container"> <img src="A.jpg" alt="" /> <img src="B.jpg" alt="" /> ... </div> Do any of you JQuery geniuses know of a code that would flawlessly an...

increase number of photos from flickr using json

Hi this is my code: Is is possible to get more photos from flickr. What is the standard / default number? $(document).ready(function(){ $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?id=48719970@N07&amp;lang=en-us&amp;format=json&amp;jsoncallback=?", function(data){ $.each(data.items, function(i, item){ ...

Convert JSON query parameters to objects with JAX-RS

I have a JAX-RS resource, which gets its paramaters as a JSON string like this: http://some.test/aresource?query={"paramA":"value1", "paramB":"value2"} The reason to use JSON here, is that the query object can be quite complex in real use cases. I'd like to convert the JSON string to a Java object, dto in the example: @GET @Produce...

Accessing web Service from jQuery - cross domain

Hi I am trying to acess a wcf service from a jQuery client Specifically this example http://www.codeproject.com/KB/aspnet/WCF_JQUERY_ASMX.aspx#4 All works well when the client webpage is on the same domain as the service As soon as I move the client webpage to another domain it breaks. It cant reach the service and the request fails ...

How to load data and save data from database in drupal using json

Load data from server side and save modified data to server side (database)using json in drupal module ...

Post data to JsonP

Hi Is it possible to post data to JsonP? Or does all data have to be passed in the querystring as a GET request? I have alot of data that I need to send to the service, cross domain, and it is too large to send via the querystring What are the options for getting around this? thanks ...

API access to a manually-created Google Map

I have a number of public custom Google Maps created via http://maps.google.com/ - obviously associated with my google account. Can I access these maps via the Google Maps javascript api? The api doesn't appear to work with the manually created maps located on maps.google.com from what I can tell? And if not, is there another way to s...

Flex and ASP.NET MVC tutorials needed

I am urgently looking for tutorials about integrating flex and asp.net mvc in an application via json. What I basically need is sending and getting data to/from the asp.net app and visualizing it using flex ...

jquery parse json

I can't parse the JSON that I have no control of. What am I doing wrong here? data.json { "img": "img1.jpg", "img": "img2.jpg", "size": [52, 97] } { "img": "img3.jpg", "img": "img4.jpg", "size": [52, 97] } jquery $.getJSON("data.json", function(data){ $.each(data, function(i,item){ alert(item.img[i])...

Jquery Bugs?? Long decimal number after two numbers multiply...

Hi all I am working on a shopping site and I am trying to calculate the subtotal of products. I got my price from a array and quantity from getJSON response array. Two of them multiply comes to my subtotal. I can change the quantity and it will comes out different subtotal. However,when I change the quantity to certain number, the...

ASP.NET MVC submitting json array to controller as regular post request (nonajax)

All the examples of json I can find online only show how to submit json arrays w/ the jquery command $.ajax(). I'm submitting some data from a custom user control as a json array. I was wondering if it's possible to submit a json array as a regular post request to the server (like a normal form) so the browser renders the page returned...

parsing data from google maps api v3 with json with php

Hi , I would like parse data from google maps geocode version 3 through json. I would like to get details like locaityName, AdministrativeAreaName and status code. May I know how to parse these data? Thank you ...

asp.net mvc outputting json with backslashes ( escape) despite many attemps to filter

i have an asp.net controller that output Json as the results a section of it is here returnString += string.Format(@"{{""filename"":""{0}"",""line"":[", file.Filename); what i get returned is this: "{\"DPI\":\"66.8213457076566\",\"width\":\"563.341067\",\"editable\":\"True\",\"pricecat\":\"6\",\"numpages\":\"2\",\"height\":\"400\",...