What is the format to transfer data(objects/lists) to use when sending over a socket?

I want to create an app(game of checkers)
The server works on the computer(then zahostit on some aws)
In it I have all the logic. It is written in Python
And clients want to do for mobile applications(Android)
and because the mobile development I have never been and I'm on the server then I need to figure out what format to I can get a socket?
Ie if I have 2 application was in Python I would be all sent out by converting all your objects using the pickle library. (I operate primarily with lists and objects built on it)
And right now I don't know what format will I be able to get the lists/objects in the right way? Will need a library in YAP on the client-side?
March 25th 20 at 13:40
6 answers
March 25th 20 at 13:42
If you need the easiest option, then Yes, it is true put the above JSON.

You can still take the BSON or Msgpack. They will be more efficient, but harder to debug.

Still, as the correct option, I would suggest Protobuf. But it is worth considering that it more complicated as described above.
March 25th 20 at 13:44
For this application, any format will do. Though private.
March 25th 20 at 13:46
In any socket operates with bytes.
Can and low-level what to send, and json wrapping. The latter may be a little overhead, but it is easy and fast.
March 25th 20 at 13:48
Will. Any json, and what is already in it - as anyone would be.
March 25th 20 at 13:50
I wrote a mobile app and a prod server, it just came up with a data exchange format.
Just share the fields with asterisks : *imei*code*setting*
Common formats (XML, JSON) for simple tasks redundant.
JSON is in the position of the Golden mean, there overhead small in comparison with the same XML. And there's yaml, which is due to the lack of brackets may be on average more concise. Major plus - all the tools ready under the formats for a long time there.
But for the sake of *imei*code*setting*, especially if your IMEI CODE and have a hard-coded length - it makes no sense to fence and json/yaml. - Mavis31 commented on March 25th 20 at 13:53
March 25th 20 at 13:52
https://github.com/irmen/Pyrolite
here there is
there
https://github.com/irmen/Pyrolite/blob/master/java...
and
https://github.com/irmen/Pyrolite/blob/master/java...
actually, I was just wondering and I googled, I serialize-deserialize byte arrays by hand (they come with the hardware via Bluetooth) - not very fun
there are still problems with the Protocol can be view here examples:
https://stackoverflow.com/questions/21794750/read-...

Find more questions by tags SocketsDevelopment of gamesMobile developmentPython