Toshok: International Man of JSonified Xaml

by Miguel de Icaza

Given Toshok's initial reaction to the lack of JSon support in Silverlight last night:

He decided to do something about it.

Silverlight is "webby" in that you can use plain text files and you can generate its content from PHP or any other webby framework by using the mighty print statement.

But XAML is annoying to type, it is webby, but its not uber-webby. It would be nice if Silverlight supported incarnation from JSon instead of incarnation from XAML, for one, it is more wrist friendly than XAML and it also a lot nicer on the eyes.

This morning Chris implemented a JSon to XAML. See his blog post.

This is done with a Javascript program, so it will work with your stock Silverlight installation.

It would be much nicer if Silverlight's Control class had a CreateFromJson in addition to CreateFromXaml.

See Chris post on the subject. You can now use syntax like this for Silverlight:

	
var json = {
  Canvas: {
    name: "Toplevel Canvas",    children: {
      TextBlock: {
        Text: "Hello World"
      }
    }
  }
}
	

Posted on 14 Aug 2007