json

how to create Jqgrid using jsp..

Hello All I am very new in jquery and json.i know jsp and java in my project job i have to implement a data grid same like shows in http://www.trirand.com/blog/jqgrid/jqgrid.html# i this example site i need a datagrid using Json object. i explore all in internet but i cant find any help of that. please provide me an example with uses j...

PHP handling of JSON-sent data

I won't tell you I've searched and tried dozens of syntaxes from the internets. You couldn't tell if I'm lying or not. So... This is part of my html (the relevant part): var jsonData = { address: 'address', address1: 'address1', address2: 'address2' }; var out = JSON.stringify(jsonData); $.ajax({ type: "POST", con...

Getting JSON data of JSTree, and it's metadata

Hi all, We're using jstree for a navigation menu editor, and have been assigning metadata to the nodes of the tree like this: var data = currentNode.data("jstree"); data.title = textBoxTitle.val(); data.linkType = textBoxLink.val(); I can see that the data object contains the relevant properties, but not too sure where jquery keeps t...

JSON and HTTP POST through URL

Hi, How can I allow my servlet to accept 4 parameters via HTTP POST through a URL? Example of URL: http:///servlet The information returned will be in text format using the JSON format. JSONObject myStr = new JSONObject(); Am using Model-View-Controller access model. JSP are my view pages, Servlets are my controllers and model are...

Should I expose web methods via ASP.NET MVC actions or WCF?

I want to be able to Ajax-ly retrieve JSON data from some kind of web service. (The web service calls will be wrapping a call to SQL, processing the DataSet returned, and returning a JSON representation.) Initially, I thought an ASP.NET MVC project with appropriately named Controllers and Actions that return JsonResults would suffice. Ho...

jquery reading nested json

I have the following json as seen below. I'm trying to read the values TOP1, TOP2. I'm a little unsure of how to do this. I'm using the following .. But that just gets me an object which has the nested objects for TOP1 and TOP2. How do I get the values TOP1 and TOP2 ?? $.getJSON('http://localhost/data/menufixed.json', function(dat...

jQuery UI Datepicker restricted AND changeable date range that auto updates

Hi! I'm trying to get my datepicker (jQuery UI Datepicker), which has one field for "check-in" and another for "check-out" to update the check-out date based on the minimum period (in seconds) pulled in via ajax when the user chooses a check-in date, but to also allow choices to be changed. For example I want to check-in on January 1, ...

Events in jQuery UI Datepicker with json data source

I want to display events in the jQuery UI Datepicker. I want the days that have events to be styled differently from days that don't have events, and I want to display a custom tooltip with the event details when hovering dates with events. The solution to the question "jQuery UI Datepicker with jQuery tipsy" gets very close, but doesn'...

Issues with stored JSON encoded POSTs in MySQL

I have a situation where after several years of use we are suddenly have some JSON-encoded values that are giving our Perl script fits due to backslashes. The issues are with accented characters like í and é. An example is Matí encoded as Mat\ud873. It is unclear what may have changed in the environment. PHP, Perl, and MySQL are involv...

Json to pojo unmarshaler with polymorph classes for android

Hello, I am having a problem with rest and android, the problem is I have a transport object in example a class Human, which is extended by Male and Female, I want to use json as transport for the human object. if I use standard serialized objects, i would usually do if(human instanceof Male.class){} else if(human instance of Female...

XMLHTTP json code - how to choose which container gets updated? JOOMLA

Displayed below are some functions I have (written by a previous developer no longer with the company) that queries a database and sends back json code which updates a specific div's inner HTML. I've now been given the requirement to set up a typeahead search in another div, using json code that we have on another page. The problem I'm h...

Advice on google/twitter search from iphone using php/json

<?php header('Content-type: application/json'); $json = file_get_contents("http://twitter.com/status/user_timeline/lindsaylohan.json?count=1"); $temp = json_decode($json); $array = Array(); $array[] = $temp; echo json_encode($array); ?> I have a JSON parser in my iphone app. I'm using the above PHP code to try and search Twitter. Can a...

Parsing JSON with Javascript

I have a webservice (RestEasy) returning a JSON object containing a List<..> element. I am trying to parse the results in a Javascript for loop. If the List<> element has 2 or more elements, all is well. If the List<> element has only one element, the Javascript loop breaks. This is because the JSON respresentation actually changes when...

PHP Json_Encode strange characters?

I am using JSON_ENCODE in PHP to output data. When it gets to this word: Æther it outputs \u00c6ther. Anyone know of a way to make json output that character or am I going to have to change the text to not have that character in it? ...

insert table into <li> when using jsTree & json

Can I somehow insert a table inside <li> when using jsTree (1.0) and json? let's say in this code where I want to insert table for both node and leaf. Why? To display more things than only a name and using nice formatting. "data" : [ { "data" : "A node", ...

How to read json arrays?

How can I read this json array? I am getting undefined results. What am I doing wrong? = jSON file == // JSON { "items": [ { "title": "welcoem home", "author": "Charles Dickens" }, { "title": "Harry Potter", "author": "J rowling" }] } <script language="javascript" > $(document).ready(function() { $('#lette...

JSON, Servlet, JSP

Hi, Firstly, my HTTP POST through a URL accepts 4 parameters. (Param1, Param2, Param3, Param4). Can I pass the parameters from the database? Once the URL is entered, the information returned will be in text format using JSON format. The JSON will return either {"Status" : "Yes"} or {"Status" : "No"} How shall I do this in servlet...

jQuery: IE returning empty for ID

I have a heartbeat interval which calls a function every few seconds. This function then in turn makes a JSON request to the server via jQuery, the server returns the JSON response and a success jQuery function like usual. Within the success function it does another jQuery function, a foreach for each id. From each id another function is...

Ajax.BeginForm, Calls Action, Returns JSON, How do I access JSON object in my OnSuccess JS Function?

Ajax.BeginForm, Calls Action, Returns JSON, How do I access JSON object in my OnComplete JS Function? so my ajax.beginform looks like this... using (Ajax.BeginForm("Coupon", new AjaxOptions { OnSuccess = "CouponSubmitted" })) and my OnSuccess Function Looks like this... function CouponSubmitted() { var data = response.ge...

Finding max value in multidimensional JSON array

Hi all! I'm looking for a really quick, clean and efficient way to get the max "y" value in the following JSON slice: [{"x":"8/11/2009","y":0.026572007},{"x":"8/12/2009","y":0.025057454},{"x":"8/13/2009","y":0.024530916},{"x":"8/14/2009","y":0.031004457}] Is a for-loop the only way to go about it? I'm keen on somehow using Math.max.....