FlatBuffers Parser is a tool for converting FlatBuffers between binary and JSON format. Supports HTTP and WebSockets protocols.
Initialize with the schema files by passing schema file names as a parameter. Specify listening port.
FlatBuffersParser [OPTION...]
-p, --port arg Port to listen.
-f, --file arg Schema files.
-v, --version Print the version number and exit.
-h, --help Print help and exit.
Send HTTP GET request with binary/JSON data to specific URI:
- Binary to JSON: /bin_to_json (MIME type: application/octet-stream)
- JSON to binary: /json_to_bin (MIME type: application/json)
Connect to parser on selected port using WebSockets. Send JSON message contatining type of request, id and data to be parsed.
- Binary to JSON: { "type": "bin_to_json" "id": , "data": }
- JSON to binary: { "type": "json_to_bin", "id": , "data": }
Set arguments (port and file) in docker-compose.yaml
docker-compose build
docker-compose up fb-parser
docker-compose up
$ git clone https://github.com/michal-kopczynski/FlatBuffersParser.git
$ cd FlatBuffersParser
Most dependencies (FlatBuffers, cxxopts, RapidJSON) are fetched automatically by cmake. Currently only RESTinio requires manual installation (i.e. using vcpkg).
FlatBuffersParser$ mkdir build
FlatBuffersParser$ cd build
build$ cmake ..
build$ make
build$ make test
tests/api$ pip install -r requirements.txt
tests/api$ pytest --port=<PORT_NUMBER>