Integrating JSON with WPF/E RRS feed

  • Question

  • I've been playing a lot with creating dynamic XAML lately and while I'm a big fan of XML it can definitely get in the way when large chunks of a WPF/E document need to be added.  Since WPF/E integrates nicely with JavaScript and ASP.NET AJAX can be used, is there any chance that you're considering adding a CreateFromJson() type method so that we could feed dynamic JSON objects representing the XAML objects to the control instead of XML strings? 

    A perfect scenario is calling Web Services with ASP.NET AJAX and adding the XAML returned to a canvas.  If calls are returned as JSON rather than XML, the message payload is minimized substantially and it's a lot easier and more concise to work with in many cases.  It would be a nice tie-in to ASP.NET AJAX IMHO although I realize it adds serialization/deserialization requirements...and that XML is a big part of WPF in general.

    Saturday, January 6, 2007 7:36 AM


  • Thanks for your feedback. It was forwarded to the produc team to consider.
    Friday, January 12, 2007 10:04 PM

All replies

  • Thanks for your feedback. It was forwarded to the produc team to consider.
    Friday, January 12, 2007 10:04 PM
  • Hi Dan,

    if you are using ASP.NET AJAX or AjaxPro you can return a string which contains an XML, so this is easy to do today. I don't see any reason to add a JSON format for the XAML code, but if you want it is very easy to write your own code for this. I did a C# implementation of the WPF/E elements and created such classes. Returning these with AjaxPro lets you get the JSON data. On the client I was using a common JSON to XML converter, and I had my XAML code...  ;)

    So, I'm not sure if this would be a big benefit when implemented in the plug-in which should be optimized to minimal size.


    Friday, February 23, 2007 12:36 AM
  • Right...I'm doing that now.  However, the XAML can be fairly large and cumbersome to work with whereas JSON is much smaller over the wire.  I don't think my feature request will ever get added, but it would be a nice feature to have to keep message sizes smaller (by orders of magnitude) and ties in nicely to ASP.NET AJAX Web Service calls.
    Saturday, February 24, 2007 5:32 PM
  • Dan,

    I had a look on a very large XAML document and created a ZIP of it what could be compared with the GZIP IIS feature for static files. I'm not sure if there is a big difference to a JSON format. A lot of the properties are set as attributes, and this will not be smaller when using JSON data format. So, I think Microsoft should concentrate more on features, plug-in bugs and maybe support in the Expression suite.


    Saturday, February 24, 2007 6:32 PM
  • I agree....I'd highly prefer they work on existing bugs and adding new features.
    Sunday, February 25, 2007 5:51 PM