.Net JSON-RPC Client Generator
#16
Has this project gone dead?
Reply
#17
Information 
The OP has not updated it in over a year but it still works for me. I'm using the free version of VS 2013 for Windows Desktop.

This is what I did to get it to work:
1. Open the JsonRpcGen.sln file
2. Remove the XbmcRt2 and XBMCRPC.RT projects form the solution, they are for windows phone and won't work with this version of VS
3. Install JSON.NET from NuGet
4. Build Solution (F7). You will see many warnings but I got no errors.
5. In Program.cs of the JsonRpcGen project set the args on line 22 to what you need. This works for me:
Code:
args=new string[]{"http://192.168.1.15:8080/jsonrpc","","", "XBMCRPC"};
6. Set JsonRpcGen as startup project and run it (F5). It will create a complete set of classes in your bin\Debug\XBMCRPC directory which are now referenced by the JsonTester project
7. Edit XBMCRPC\List\Item\All.cs replacing
Code:
    public class All : XBMCRPC.List.Item.Base
with
Code:
    public class All : XBMCRPC.List.Item.BaseFile
8. Edit XBMCRPC\AllConverter.cs replacing
Code:
if (jObject[_multipleInheritanceKey] == null)
            {
                value = jObject.ToObject<XBMCRPC.List.Item.AllFile>();
            }
            else
            {
                value = jObject.ToObject<XBMCRPC.List.Item.AllMedia>();
            }
with
Code:
            if (jObject[_multipleInheritanceKey] == null)
            {
                value = jObject.ToObject<XBMCRPC.List.Item.All>();
            }
            else
            {
                value = jObject.ToObject<XBMCRPC.List.Item.All>();
            }
9. In JsonTester\MainWindow.xaml.cs make a few changes:
In Line 41 enter your correct info for connecting to Xbmc.
Comment out lines 52-60
In Line 75 replace "as All" with "as XBMCRPC.List.Item.All"
10. Go to Xbmc and start a movie or Tv Show playing
11.Set JsonTester as startup project and run it (F5).
12. Press the Test button. After a moment you should see the poster of the playing movie appear in the window

I'm not saying that all these changes are perfectly correct (you still get lots of compiler warnings) but the project works for me. I've not tried everything but what I have tried seems to work fine.Big Grin
Reply
#18
Thumbs Up 
Thank you sir !! The demo app now works for me too !

Big Grin
KODI:
Windows 10, 32 GB of ram, AMD Phenom X6 @ 2.80 ghz, Using onboard video card with HDMI out
Reply
#19
I have this compiling (thanks to ncarthy) and the JsonTester app is working fine.
But I'm trying to figure out how to play a particular artistid . would any one have any ideas?
do I use Player.Open ?
thanks,
Steve
Reply
#20
Hello,

I just made the client generator and the sample app free and open source (MIT licence GPL). Everyone is now invited to improve the app and client library.

Download in Windows Store

Souce Code on GitHub

Since my initial post there has been many changes to the app:
  • complete redesign
  • moved to Windows 8.1
  • added remote control
  • auto setup
  • improved automatic .Net Client Generator
  • moved Client Library to XBMC 13 Gotham
  • ...


Regards
Steve

Edit: Following a suggestion, I changed the license to GPL. This will ensure, that all improvements has to be shared with the community.
Reply
#21
nevermind
Reply
#22
The question of fr500 was: does it work on Xamarin for iOS and Android.

Yes, the .Net Client and the core (model layer) of the app will run on Xamarin, too.
Reply
#23
Tongue 
Yes I tried it now, thank you very much. Sorry for crossposting the issue everywhere :p going into github and here..

Now I have another question, the generator is GPL, but what about the generated code? thing is if it is GPL noone can develop apps that qualify for distribution on the iTunes store (actually I stumbled upon your generator when I started testing stuff for an XBMC music player for mobile devices).
Why not license the generated code as MIT?

My app is going to be open source too btw but I want it to be on iTunes so I'm considering what the best alternatives are
Reply
#24
I thought about the iTunes issue. I will change the licence to make it compatible. But I'm not sure which one is the right choice. What do you think about the "Mozilla Public License"?
Reply
#25
I think having your APP as GPL is the right thing. Maybe the generator and the generated code should be MIT, BSD, Microsoft Public License or APACHE (but not the core of your app).
I guess it would be best if you separated both projects into their own repositories but that's just my opinion.
Reply

Logout Mark Read Team Forum Stats Members Help
.Net JSON-RPC Client Generator0