JSON-RPC Client Generator (for XBMC)

Steve Nessen   •   September 30, 2012   •   0 Comment

My latest project is a contribution to the XBMC community. The existing .Net API Clients are a bit out-dated. I got the idea of taken the JSONRPC.Introspects result and generate a client library from it.

JSON-RPC Client Generator (for XBMC)

Post at XBMC Forum

The generator takes the JSON schema returned by the JSONRPC.Introspect method and generates C# types and methods. The classes should be compatible with .Net, Silverlight, WinRT and Windows Phone. These methods support the async/await feature of Visual Studio 2012.

The advantages of this auto generated .Net API client:

·         Containing ALL methods of the XBMC API

·         No manual maintenance of single methods

·         Uses the same type and method names used in the API documentation

·         Fast availability, if new methods are added to the XBMC API

This first release has been tested on .Net 4.5. I will test the generated code on Windows Phone 7 as soon as the new Windows Phone 8 SDK is released.

If you don’t want to wait and want to use the async/await feature for Windows Phone 7 development, you need the Async CTP for Visual Studio 2010. You should install this on a clean virtual machine because of the problems described in this post.

The generated code references the JSON.Net framework.

To generator code does not implement all aspects of JSON schema. Only the parts necessary to get the XBMC client running are implemented.


0 Comments

Leave a comment