Forum Scripting Updating a DatabaseObject via a JSON string

Post your problems and discussions relating to scripting in Unity here.

Updating a DatabaseObject via a JSON string

Postby shinyshoe » August 28th, 2013, 5:21 am

Hi there,

I'm a Player.IO newbie and am planning my file system architecture on a game where I'd like to use your service. I've been reading the documentation and have a question regarding DatabaseObjects.

To keep my client-side code simple I'd like to update a DatabaseObject by sending serialized JSON from my C# types using a proven JSON serializer (JSON.net, JSONFx, etc.) instead of manually allocating a DatabaseObject and poking in every value I want serialized. I could write a client-side reflection-based serializer that can go to and from DatabaseObjects, but the complexity of doing so isn't trivial (with regards to generic collections, etc.) and is one of the issues that the aforementioned well-known JSON serializers already solve.

Similarly, if I could retrieve a DatabaseObject as a JSON-blob directly from your API that would let me easily use an existing deserializer to turn it into a .NET type.

Is anything like this possible currently?

Thanks,

Mark
shinyshoe
 
Posts: 1
Joined: August 28th, 2013, 5:12 am

Return to Scripting



cron