Closed punkouter2021 closed 8 years ago
The Mobile Service client implements UnityRestClient library which uses JsonFx plugin to parse JSON data. (The reason why JsonFx plugin is because it runs on all mobile platforms, and its also free.)
More info about the Mobile / App Service REST APIs supported are on the MobileService repro.
What do you do when you want to use a public REST service. My guess is something like.
Am I right? OR missing anything ?
Yes, except I use RestRequest instead of Unity WWW class. This might be something to look at again. But the UnityRestClient library has an XML and JSON serializer which uses the JsonFx plugin.
Ok. So this is what you do internally to call the Mobile Services is REST calls ? So if I wanted to know how to do REST calls I should look at that ? Between being able to call REST and put into objects + use Azure Mobiles Services that should cover everything I need
@punkouter There are some interesting developments on the Unity Roadmap for REST and JSON (but I need to read through all the docs to see if I can use it for this project)
But as these are new Unity features and this demo project currently uses UnityRestClient & JsonFx plugin as mentioned. So in this case the REST -> JSON -> Object flow is:
I wonder if it will get to the point no wrapper is needed ?
I do have this working for a simple highscore table. My confusion is more about how to use this with an API app instead of a Mobile App.. A API App that uses code first is what I hope to understand at some point. I don't want any javascript anywhere.
Also if my API app uses swagger then it would be nice if I could generate the client proxy so I don't even have to parse json
Good idea - be good to add other features of App Services like API Apps. But I really want to finish the feature set available for Mobile Apps (successor to Mobile Services) first. I've just added a wiki page on current features / possible features to be supported - https://github.com/Unity3dAzure/AppServicesDemo/wiki/Azure-App-Service-features-supported-for-Unity3d
Closing this issue for now - Unity Web Request and Json Utility developments are assigned to issue #22
The Azure part here is 50% of what I am trying to do. Accessing REST APIs is the other part.
Are you using just the WWW class and some JSON library? I have not been able to find much to get me going in the right direction