json

How to retrieve the Json variables from the AJAX Response.

When I tried to fetch the values from a Json response, I stucked up. Here is my code Code: $.ajax({ url: 'checkvotes.php', dataType: "json", success: function(data) { // want to fetch UP and DOWN variables from JSON here } }); AJAX Response from PHP {"sample":[{"id":"1","message":"my message","up":...

Mobile Application Using Sencha Touch - JSON Request Generates Syntax Error

Hi, I started playing a bit with Sencha Touch. So I've built a really simple application based on one of the examples just to see how it goes. Basically it creates a JSON Request which executes a Last.FM web service to get music events near the user's location. Here's the JSON code: var makeJSONPRequest = function() { Ext.ut...

REST/JSON Web Services Java EE Framework

Hi all! I'm will build a web service. I'd rather like REST/JSON than SOAP. Anybody can tell me what is the best Java EE framework for that? Thanks! ...

Use JSON to extract parameters from URL.

How do extract parameters from the URL when the method is posted using JSON? ...

Retrieve plain text with jquery ajax and convert to JSON

Update: the following works fine in IE8, but data comes back null in firefox: $.getJSON('myUrl/solr/select/?q=citystate%3ASea*&version=2.2&start=0&rows=3&indent=on&wt=json&fl=citystate', function(data) { alert(data.response.docs[0].citystate); }); I have a jetty server that generates json data as plain text - here are what the heade...

How to Make JSON List/Data Accessed Through Server?

Ok I am working on a Script that will Sniff the Firefox Browser from all other using Feature Detection and i came up with the Following Code <script type="text/javascript"> <!-- var CheckSet = { 'Propeties': [ {Property: 'azimuth', 'Result': 0}, {Property: 'pitch', 'Result': 0}, ...

PHP to JSON on client side

Hi, I'm using Rob Monies 'Jquery Week Calendar' to build a calendar application. I have a MSSQL DB a with table named 'dates' and the following fields: id start end title I would like to query this DB in PHP and then pass the results to Javascript, Javascript will then render the events in the browser. The Javascript needs to receiv...

mvc 2 jsonresult output

hello, how can i see the raw json output of mvc 2 jsonresult? i need this to enable me debug the results. thanks ...

Strip slashes that jQuery adds when returning HTML via ajax?

I am using the jQuery ajax method to get data from the database and return the data via a json object. However one of the values in this json object is an HTML string. I am basically doing exactly what is seen here except I need to know how I can remove the slashes that jQuery is adding to the HTML string. Any ideas? Example json.HTML ...

AJax JSON Call error when trying to access the properties of class

I am making a JSON call to web method which is defined in code behind. The web method returns a class object.The class returns 3 properties one of type list and 2 integers. I am accessing these in the following manner: success: function(result) { alert(result); alert(result.LookCount); ...

OpenLayers Format JSON is Returning Empty responseText String

Hello StackOverflow, After a week of posting at the OpenLayers forum and not receiving responses to my questions, I have decided to look here. I have Googled and Googled and Googled and even found a wonderful tutorial concerning this topic, in Spanish, but so well written that Google translate was able to translate it perfectly. gis...

Set the value of an ExtJS ComboBox to an Object, not an object property

I have a ComboBox in an EditorGrid. I am populating it (trying) using JSON, which is produced by serializing an IList<FertilizerType>. I want the valueField of the ComboBox to be equal to the FertilizerType objects and the displayField equal to FertilizerType.Name Here is a Crop: {\"Id\":1300,\"Active\":true,\"Code\":\"Ammonium Bicarbo...

Multiple responses from function

I'm trying to have this function return multiple results in array(?). So basically instead of running lookup("354534", "name"); and lookup("354534", "date"); mutiple times for different results, how can I return both name & date from that function, then echo it out so I only have to use the function once? function lookup($data, $w...

Twitter record size

Hi! Sorry for maybe stupid question;) I am trying to model records like if they were modeled for twitter. It is interesting for me how big or small they are? Is it normal that they can be bigger than 512 bytes per record? And what methods do you know for optimization records within json documents? I mean especial for json;) Maybe some...

FlexJSON doesn't serialize class objects fully

Hi I am new to FlexJson and was following http://flexjson.sourceforge.net/ for simple tutorial. I wrote a simple program but it seems not to be serializing the object attributes. Please help me if someone knows about this /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.web...

How to conver JSON collection into Hash using Rails 3

Hey, I am having JSON collection fetched from MongoDB & I want to convert it into Hash. How can I do so..? Thanks in advance.. ...

How do I use JSONRequest.POST to get parameters from a url?

how to get POST parameters at a URL, using JSONRequest. The original site will be www.abc.com/aServlet. For example, www.abc.com/aServlet?user=tom I want to get the paramter of"user" which is "tom". I am actually keying in the user manually in aServlet which is a servlet. The problem is I dont know how to use JSONRequest to retrieve th...

Google Chrome display JSON AJAX response as tree and not as a plain text

I cannot find an answer to this one: My AJAX calls return JSON data. In Google Chrome Developer Tools > Resources > XHR when I click on the resource on the left and then on the Content tab I see the JSON string as a string and not as a tree as Firebug and Firebug Lite do. How do I force Chrome to diplay it as a tree. Is there a Content...

How Do I Create a JSON Feed from a MongoDB Collection

I'm creating a CMS for my client to work with his photographs and to sell them on his site. For the CMS end as well as the front end, which both will be all AJAX, it'd be nice to get a JSON feed setup so that I can just use the same feed to generate new "pages" and "views" with JS. So this example feed would have like {[name:'A Photo',d...

Problem while sending JSON DATA

Hi , I have to pass my Json data in a particular format. My app is coded in vb. The following is my code : Dim jsonObject As New Json.JsonObject jsonObject.Item("count") = New Json.JsonNumber("0") jsonObject.Item("data") = New Json.JsonArray("") **jsonObject.Item("success") = New Json.JsonString("True")** The Probl...