json

What JSON library works well for you in .NET?

I'd be interested in hearing what JSON library folks in the community have been using inside of .NET? I have a need to parse/serialize some JSON object graphs from inside .NET (C#) to actual .NET types. I could roll my own, but if there are some solid libraries folks have used, I'd like to hear your comments. I saw the list of librari...

How can I encode an Array in VB.NET to JSON?

I need to pass back a JSON result for a routine I am working with. How can I encode an Array I created to JSON? I am writing this in VB.net ...

JSON character encoding

I am writing a webservice that uses json to represent its resources, and I am a bit stuck thinking about the best way to encode the json. Reading the json rfc (http://www.ietf.org/rfc/rfc4627.txt) it is clear that the preferred encoding is utf-8. But the rfc also describes a string escaping mechanism for specifying characters. I assume t...

How to push diffs of data (possibly JSON) to a server?

I am going to be periodically pushing a set of text-based data from a web-page to a server, probably as JSON. For every push, none, some or all of the data may have changed. To reduce the amount of data I have to send over the wire I would want to only send a diff of the changes in each push. Do you know of any pre-made solutions / too...

What are the advantages and disadvantages of json vs xml for ajax requests?

What are the advantages and disadvantages of json vs xml for ajax requests? Is there a difference in performance? i.e. are browsers able to process one format faster than the other? ...

What is the best way to load ASP.Net usercontrols via JSON?

What is the best way to emit an asp.net usercontrol back to the browser based on a JSON request? So far I have a web service which creates the user control and sends it back to the browser. However when I post back the whole page, I get an error about "the state information is invalid for this page and might be corrupted." Considering...

JSON structure not working in IE7 (JavaScript)

OK, I'm new to JSON so please forgive me if my question is a little ignorant - I've beat my head against the wall too much and need some expert advice. I'm trying to get a simple example working where an HTML page uses jQuery's JSON/AJAX functions to make a call to an example PHP page which passes back a simple JSON data structure and t...

IronPython "LookupError: unknown encoding: hex"

When I try to "import simplejson" (or something that depends on it) in IronPython 2.0, I get "LookupError: unknown encoding: hex". How do I make this work? ...

What are benefits of serving static HTML and generating content with AJAX/JSON?

http://blog.urbantastic.com/post/81336210/tech-tuesday-the-fiddly-bits Heath from Urbantastic writes about his HTML generation system: All the HTML in Urbantastic is completely static. All dynamic data is sent via AJAX in JSON format and then combined with the HTML using Javascript. Put another way, the server software for Urbanta...

Passing data from a jquery ajax request to a wcf service fails deserialization?

I use the following code to call a wcf service. If i call a (test) method that takes no parameters, but returns a string it works fine. If i add a parameter to my method i get a wierd error: {"ExceptionDetail":{"HelpLink":null,"InnerException":null,"Message":"The token '\"' was expected but found '''.","StackTrace":" at System.Xml.Xm...

405 method not allowed error when trying to post to web service

Hello all, I borrowed the following code to try to make an ajax-enabled WCF service work since I kept getting the 405 method not allowed error: $('#btnSave').click(function(e) { $.ajax({ type: "POST", url: "AjaxWcf.svc/ConnectionTest", contentType: "application/json; charset=u...

Quick way to return a list of custom objects from a page method w/o a separate BLL

I am using jQuery to retrieve a JSON object from a page method. I have a DAL which uses SubSonic and if I return objects created from SubSonic-generated classes I will clog up the pipes. :) You know, all public properties get serialized. I don't want a separate business layer for this application, because it's small and focused on read o...

Passing variables to a view using Asp.net mvc and jQuery load()

Hi I'm currently loading a view(ascx) into a div using jQuery load(). I want to pass some variables to the view when loading it though so i'm using $.load(view, data); This does not seem to cause any problems but i have no idea how to access the Json object i'm passing in to the control. Here is the jQuery: var val = {"Id":"1"}; $("#D...

Deserialization problem with DataContractJsonSerializer

I've got the following piece of JSON: [{ "name": "numToRetrieve", "value": "3", "label": "Number of items to retrieve:", "items": { "1": "1", "3": "3", "5": "5" }, "rules": { "range": "1-2" } }, { "name": "showFoo", "value": "on", "label": "Show foo?" }, { "name...

Testing document uploads in Development server using json files

I just built a small application(using Django) which will accept any jobseeker resumes. So any jobseeker uploads his/her resume in the form provided. How do I test this using testcases. I am used to writing fixtures for my initial data using json files. How would I have the same sort of a thing with doc files? So simply I want to run my ...

JSON Parse Error using FLEX and PHP

I am using JSON to parse data and connect to a PHP file. I am not sure what the problem is because I am a newbie to flex. This is the error I am receiving: JSONParseError: Unexpected < encountered at com.adobe.serialization.json::JSONTokenizer/parseError() at com.adobe.serialization.json::JSONTokenizer/getNextToken() at com...

Problems with jquery append and json data

I'm having trouble making this work: $(function() { $(".button").click(function() { var newentry = $("input#entry").val(); $.getJSON("/dictionary_request/", {entry: newentry}, function(json){ $("span").empty(); alert(json); $("span").append(json); }); }); }); The JSON request, the emptied span,...

Authentication Required - Problems Establishing AIM OSCAR Session using Python

I'm writing a simple python script that will interface with the AIM servers using the OSCAR protocol. It includes a somewhat complex handshake protocol. You essentially have to send a GET request to a specific URL, receive XML or JSON encoded reply, extract a special session token and secret key, then generate a response using the token ...

Ajax / Json How to run an INSERT/UPDATE into mysql

Again related with my weekend project, I'm trying to learn a bit more of web-development. So I'm putting in the list of features i want to implement, some stuff i absolutely have no idea how to do. I've been reading tutorials on how to use ajax, but i can't find a simple one, that i can copy-paste (with one or two changes) to see it wor...

Google JSON/Ajax API - how do you get the next page of results?

According to : http://code.google.com/apis/ajaxsearch/documentation/#fonje I get back a cursor result, but stupidly, the moreResultsUrl returns a URL NOT to the JSON service but to the main site - how do instead fetch the next page of results into JSON? ...