Miguel de Icaza, head of Mono, tweeted:
migueldeicazaIn 2007 @toshok used JSON instead of XML for XAML. It is wrist friendly, and programmer friendly:http://bit.ly/2fjEpN
The post, titled, why xaml when you can json? shows this snippet and has createFromJSON code.
JSON and XAML
var json = {
Canvas: {
name: "Toplevel Canvas", children: {
TextBlock: {
Text: "Hello World"
}
}
}
}
and it converts that to the following xaml:
<Canvas xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml” x:Name=”Toplevel Canvas”><TextBlock Text=”Hello World”/></Canvas>
{ 0 comments… add one now }