json

Trying to return data asynchronously using jQuery AND jSon in MVC 2.0

Hi, I am trying to use Jquerys getJSON method to return data server side to my browser, what happens is the url the getJSON method points to does get reached but upon the postback the result does not get returned to the browser for some odd reason. I wasen't sure if it was because I was using MVC 2.0 and jQuery 1.4.1 and it differs to t...

null value exception thrown when deserializing null value JSON.net

Hi Friends I am trying to deserialize a hidden control field into a json object the code is as follows Dim settings As New Newtonsoft.Json.JsonSerializerSettings() settings.NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore Return Newtonsoft.Json.JsonConvert.DeserializeObject(Of testContract)(txtHidden.Text, settings) But I am ...

Time to start a counter on client-side.

Hi everybody, I'm developing an web application using asp.net mvc, and i need to do a stopwatch (chronometer) (with 30 seconds preprogrammed to start in a certain moment) on client-side using the time of the server, by the way, the client's clock can't be as the server's clock. So, i'm using Jquery to call the server by JSon and get the ...

Returning JSON in CFFunction and appending it to layer is causing an error

I'm using the qTip jQuery plugin to generate a dynamic tooltip. I'm getting an error in my JS, and I'm unsure if its source is the JSON or the JS. The tooltip calls the following function: (sorry about all this code, but it's necessary) <cffunction name="fGameDetails" access="remote" returnType="any" returnformat="JSON" output="false" ...

Call .NET Webservice with Android

Hi, I know this question has been asked here before, but I don't think those answers were adequate for my needs. We have a SOAP webservice that is used for an iPhone application, but it is possible that we need an Android specific version or a proxy of the service, so we have the option to go with either SOAP or JSON. I have a few conc...

How to create and populate cascading dropdowns from json (converted from csv)?

I have an html page and want to have 3 dropdown boxes (department name, course name, and course number). I want the user to select the department name first and this will trigger the course name dropdown then once the user selects the course name, the course number dropdown will be populated. I already have a csv file with all the info...

Loop through JSON Request

All, I have the following JSON Request that comes through a function call in PHP. As evident, each URL can belong to one or more catids. How can I loop through the JSON request and create an associative array that denotes which catid has how many URLs in it. Ex: $arr = array("140"=>3, "141"=>4, "144"=>3) JSON Request: { "head...

Graceful Degradation with JSON.Parse

If a browser doesn't support JSON.parse, would it make sense to include json.js and call parseJSON in lieu? So the code would looks something like: var z; if (JSON.parse) z = JSON.parse(yada); else z = JSON.parseJSON(yada); ...

parsing non-strict json, one in which keys are not enclosed in quotes, with Java

I am trying to parse a string which in JSON format only that keys are not enclosed in quotes. I can very well parse this string in Javascript, but can not find a Java API which will help me parse this. All the APIs I tried assumes strict JSON format. Can anyone suggest a library which has an option to parse this, or a whole new appr...

Twitter client with JQuery not working in Firefox

Hey guys, I've got a little script that fetches my latest tweets... I use JQuery's getJSON method to fetch my tweets. The script works well with Chrome and Safari but when it comes to Firefox, nothing appears! here's the code: $.getJSON('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=lpdahito&amp;count=3&amp;callback...

How to decode UTF8 characters with JSON on iPhone ?

Hi there, I'm using ASIHTTP Request to get a NSString response that I give to a SBJSON parser. The problem is that inside the NSString response I got some UTF8 encoded character (accent) that I need do decode to make the app works. How can I decode UTF8 with JSON? I call the JSON message like this: [jsonParser objectWithString:jsonStri...

XML library similar to simplejson/json? - Python

Hi folks, is there a similar library to simplejson, which would enable quick serialization of data to and from XML. e.g. json.loads('{vol:'III', title:'Magical Unicorn'}') e.g. json.dumps([1,2,3,4,5]) Any ideas? ...

fullcalendar events from REST-ful php server.

I've written a very simple RESTful php server (my first experiment with REST, so feel free to make suggestions) to respond to the fullcalendar events callback. It produces exactly the same string output as the json-events.php file in the fullcalendar json example, but for some reason fullcalendar will not accept my server's output. I...

ASP.NET WebMethod Returns JSON wrapped in quotes

Hi, I have an asp.net page with a WebMethod on it to pass JSON back to my javascript. Bellow is the web method: [WebMethod] public static string getData(Dictionary<string, string> d) { string response = "{ \"firstname\": \"John\", \"lastname\": \"Smith\" }"; return response; } When this is returned to the client it is for...

Share Json data between Asp.Net MVC 2 and Asp.Net server side C# code?

I created and love my Asp.Net MVC2 application. It's a very nice DDD app with Domain Model classes, View Model classes, a repository, and Json action methods to expose data. My coworker wants to share my data with his Asp.Net Forms based C# code. He wants to pull through the Internet a class definition (like a Data Contract), then fil...

Is Stomp's MessageMap format completely unusable?

I'm sending MapMessages in Java to ActiveMQ and retrieving them using Stomp in PHP. My message creation code looks like this: MapMessage message = session.createMapMessage(); message.setInt("id", 42); message.setInt("status", 42); message.setString("result", "aString"); When I retrieve them in PHP, the array that's created looks like ...

Force jQuery ajax

Hi I noticed that jquery ajax request sometimes take about 1-2 seconds before the responce comes is this normal and is there any way to short that time to minimal? The responce type is json and it's small html code. Thanks! ...

what is the best way to optimize my json on an asp.net-mvc site

i am currently using jqgrid on an asp.net mvc site and we have a pretty slow network (internal application) and it seems to be taking the grid a long time to load (the issue is both network as well as parsing, rendering) I am trying to determine how to minimized what i send over to the client to make it as fast as possible. Here is a ...

read, parse and process json (java)

Guys, simple situation - read a json file discover all key-value pairs compare key-value pairs I tried gson, package from json.org, but can't seem to get far with it. Can someone please provide a clear sample in Java on how to take a file, read it, end up with json objec i can get key/value pairs from thanks so much ...

Get Asynchronous HttpResponse through Silverlight (F#)

I am a newbie with F# and SL and playing with getting asynchronous HttpResponse through Silverlight. The following is the F# code pieces, which is tested on VS2010 and Window7 and works well, but the improvement is necessary. Any advices and discussion, especially the callback part, are welcome and great thanks. module JSONExample open ...