Showing posts with label json. Show all posts
Showing posts with label json. Show all posts

Tuesday, November 11, 2008

C#, Jayrock, Export JSON string

To export a .Net Class to JSON string, Jayrock needs both a public default constructor (constructor with no arguments) and public properties (with get and set) for all vaules you want to export.

Alternatively you can implement the IJsonExportable interface, which gives you full control over the export process.

Wednesday, October 8, 2008

Javascript: Conflict between jQuery and json.js

There’s a conflict between jQuery and Douglas Crockford’s json.js. The reason is that json.js tries to add a toJSONString() function to every object. The solution is to get a json2.js from http://www.json.org/json2.js. json2.js differs from the first version by using “a single base object (JSON) instead of extending all native object prototypes”.