json

Google Elevation API with AJAX?

Hi, I am trying to use the Google Elevation API with the getJSON function of JQuery. I am using this code which is using JSONP : jQuery.getJSON("http://maps.googleapis.com/maps/api/elevation/json?locations=23.444,45.4545&sensor=false&jsoncallback=?", function(json){ alert("a"); }); I can see in Firebug that the GET reque...

Mapping tool for converting Java's JSON to/from C#

Is there any tool out there can convert Java's JSON to/from C#? ...

How to call textual function in javascript/jquery?

For example: <input id="#me" type="button" callme="doAction()"/> <script> var result = callFunction( $("#me").attr('callme') ); /// ????????? </script> ...

jsoncpp on linux: multiple "warning: statement has no effect" in test cases

I'm building jsoncpp on andlinux (based on Ubuntu) and getting warnings in all the test cases which seem to indicate that the tests aren't called. Is anyone else here using jsoncpp on Linux - if so did you get the test cases to build properly? Looking at the jsoncpp forums there isn't much activity at the moment: would I be better off...

Deserialize JSON in Silverlight 4

Hi there, I have a class MyItems in my namespace as [DataContract] public class MyItems { [DataMember] public int LineNum { get; set; } [DataMember] public string ItemCode { get; set; } [DataMember] public string Priority { get; set; } [DataMember] public string Contact { ...

Should I make Jackson's ObjectMapper as static final

ObjectMapper in Jackson seem to be thread safe. http://wiki.fasterxml.com/JacksonFAQThreadSafety Does this mean, is it OK for me to declare class Me { private static final ObjectMapper mapper = new ObjectMapper(); } instead of class Me { private final ObjectMapper mapper = new ObjectMapper(); } Thanks. ...

PHP SQLite JSON Data Duplication

I have the following PHP code: $testMessage = "TESTMESSAGE"; $db = new SQLite3('messages.sq3'); $db->exec('CREATE TABLE messages(id INTEGER PRIMARY KEY, message CHAR(255));'); $db->exec("INSERT INTO messages (message) VALUES ('$testMessage');"); $results = $db->query('SELECT * FROM messages ORDER BY id DESC LIMIT 5'); while ($row = $...

getJSON and invalid label

I am trying to get json data from a url. Url is working ok in FF. I am trying code like this $.getJSON("http://testsite.com/1234/?callback=?", function(data){ //here i am getting invalid label error** } ); When i am trying without callback=? i am getting empty data $.getJSON("http://testsite.com/1234/", function(data){...

Problem with decoding JSON as array or object with PHP

I'm trying to use PHP to process JSON and am having trouble parsing it as either an object or a string. Here is the JSON feed: stdClass Object ( [Response] => stdClass Object ( [Meta] => stdClass Object ( [ExecutionTime] => 0.41602396965 ) [Data] => stdClass Object ( [Entity] => stdClass Object ( [id] => 1 [name] => Wal-Mart Stores [de...

jqGrid does not populate with data

I am trying to populate a jqGrid with data from a web service. I have looked at the jqGrid code and documentation thoroughly. I need another set of eyes to look at the code below and tell me if I'm missing something. As you'll see in the code, I have the grid set up to load when the page loads or during a refresh. After the grid load...

BaseAdapter Class used with Json Parsing

Hi All! I have Parsed the Json Response and Now I want to use the BaseAdapter Class in my Application. I have a rough Idea about the BaseAdapter Class but not very clear about the same. Can anybody please tell me what exactly the Base Class does. Also do I need to use the Getter and Setter Methods if I am using the BaseAdapter Class i...

Conditional call based on JSON data

hi, I am trying to modify my Javascript page, which uses Ext Js library.(I don't have any idea about ext js, haven't worked on it either) What I want To do is that based on the JSON DATA particularly the field "successProperty", I want to decide whether to upload the grid or give an alert. What I can possibly do is to add an event to ...

Wrong convert Object from JSON.

First, sorry for my poor English. Second, my problem. I trying convert to JSON and back this structure: class Revision{ private String auth; private HashMap<String, List<HashMap<String, Object>>> rev; public String getAuth(){ return auth; } public HashMap<String, List<HashMap<String, Object>>> getRev(){ ...

Check if value exists in a json_encode stored mysql table column??

Hello, I am trying to create a query which checks if a value exists in a column. The column constists of json_encoded values (like, ["3","10"]) function totPerWorkshop($id){ $q = "SELECT * FROM tblWorkshop WHERE workshops = $id"} Does something like SELECT * FROM tblWorkshop WHERE in_array($id, workshops); exists? Any suggestions ...

How do I pass a JSON object to FullCalendar from Django (by serializing a model)?

FullCalendar supports taking in a JSON object through AJAX for it's events, this can be done on initialization or later like this: $('#calendar').fullCalendar('addEventSource', "/{{ user }}/events/" ); The serialization itself in my Django view looks like this: ... events = Event.objects.filter(user=request.user, start__gte=start, en...

Bind "up" element in jQuery? it's possible?

Example: $(X).bind('click', function() { alert( 'Two' ); }); $(X).bind('click', function() { alert( 'Three' ); }); $(X).bind('click', function() { alert( 'Four' ); }); $(X).bind('click', function() { alert( 'Five' ); }); **$(X).bindUp('click', function() { alert( 'One' ); });** When the user click X the output should be: alert( 'One...

JSON Structure for List of Objects

I would like to know, whats the right structure for a list of objects in JSON. We are using JAXB to convert the POJO's to JSON. Here is the choices, Please direct me what is right. foos: [ foo:{..}, foo:{..} ] or foos : [ {...}, {...} ] If the first structure is ...

I need to remove double quotes from JSON for use in NSDictionary

I have a JSON return that I'm trying to save into a NSDictionary, However, Since there are spaces in the data being returned, the Dictionary won't save this array because of the quote being included. Is there a way to parse the SBJSON to remove the double quotes prior to saving to the rowsArray? rowsArray: { Rows = ( ...

Restful JSON API only or XML API too?

I'm going to create a restful api in Json to provide data to my customers. I really prefer json over xml. All my coding is done in json. I wonder, is it sufficient to just provide json api and tell the customers through the homepage that json rocks over xml and we only use json, or are there a lot of customers that just prefer xml and ...

parse json with shell scripting at linux

I have a JSON string like the example below and I want to use, for example, the value of the "uptime" command as a variable in a shell script, what should I do? { "serverStatus" : { "version" : "1.6.0", "uptime" : 527, "uptimeEstimate" : 526, "localTime" : { "$date" : 1286923624579 }, "globalLock" : { "totalTime" : 526604302, "lockT...