Inferring schemas for JSON

One recurring theme that I see in the forums is when a user has a sample JSON document (something that is returned by a service, for example), and he/she wants to deserialize similar JSON documents. That’s the case for most AJAX services which return JSON out there – since there’s no standardized metadata description for…


JsonValue viewer

One more nice tool for the JsonValue API: a WPF control which can be used to view JsonValue graphs. It’s a simple control which inherits from TreeView and shows the graph in a tree-like fashion. This following JSON document, for example, is shown in the picture below. [1,2,true,”hello world”,null,{“one”:1,”two”:2,”bool”:true,”str”:”Hello world”,”array”:[null,{},true,false]}]                     JsonValueViewer The viewer uses…


Deep event propagation in JsonValue

One of the features added in the latest release of the WCF for jQuery support in Codeplex was the ability for a user to register to listen to modifications in a JsonValue instance. However, if you have a JSON DOM and you want to be notified for changes in any member of the graph, you’d…


System.Json improvements

Yesterday the WCF team released a new version of the “WCF Support for jQuery” libraries on codeplex (http://wcf.codeplex.com). Besides some bug fixes, we added some new features to make the JSON API better. Here’s a short list of them: Events Similarly to the XElement API, JsonValue now supports events as well, so that a user…


JsonValue pretty printing

Now that the System.Json API has been released (http://wcf.codeplex.com, http://wcf.codeplex.com/wikipage?title=WCF%20jQuery), I’ll start posting a series of “improvements” that I’ve done over the past few months using that library. Let me know if you find it useful, and I’ll bring it to the team to include in future releases of the Codeplex project. To start, something…


Working with untyped JSON in a WCF service

Since NetFX 3.5, WCF has support for working with JSON data. You can define your data contracts according to the JSON “schema” you expect to receive / want to return, plug them into your operation contracts, and your server is talking JSON. With this feature you can define the contract such as: public class Person…