4

I'm writing applications for Android and iOS, until now we were using JSON to pass data between the server and the client apps. Our server is written in PHP. Now I was thinking to move our implementation to FlatBuffers instead of JSON.

Does someone knows if I can produce them using PHP? I'm not a server developer so I have no idea how this works on the server side.

halfer
  • 19,824
  • 17
  • 99
  • 186
Emil Adz
  • 40,709
  • 36
  • 140
  • 187

2 Answers2

1

There currently is no FlatBuffers code generator for PHP, only C++/Java/C#/Go/Python. The flatc command line tool however can convert a binary flatbuffer file to JSON for use with any language.

EDIT: a PHP implementation was just contributed to the project.

Aardappel
  • 5,559
  • 1
  • 19
  • 22
1

Yes, you can produce them with php. Google just released a php library.

There are some resources on the projects webpage.

You still need the C compiler to compile the schemas. If you are on a mac you can just install it using brew install flatbuffers (using home brew).

Langusten Gustel
  • 10,917
  • 9
  • 46
  • 59