Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace flatbuffers with json serialization library #222

Closed
8 tasks done
coder137 opened this issue Nov 2, 2022 · 3 comments
Closed
8 tasks done

Replace flatbuffers with json serialization library #222

coder137 opened this issue Nov 2, 2022 · 3 comments

Comments

@coder137
Copy link
Owner

coder137 commented Nov 2, 2022

https://github.com/nlohmann/json

Why?

  • Has easier serialization APIs for C++ STL storage
  • Can add custom types (C++ structs -> json)
  • Can output in human readable (json) and binary format (ubjson, cbor, messagepack etc)

Problems with Flatbuffers

  • Harder to create a C++ to FBS interface
  • For JSON like output need to use flexbuffers instead of flatbuffers (no array like root_type allowed)
  • Schema -> C++ conversion is harder, since there is no explicit support for hashmaps/hashtables/maps/tables.

TODO

  • Add nlohmann::json library as a submodule
  • Migrate custom_generator.fbs
  • Custom Generator Unit tests
  • Migrate target.fbs
  • Target Unit tests
  • Migrate FileGenerator and TemplateGenerator from flexbuffer to json
  • Remove flatbuffers dependency and delete third_party flatbuffers submodule
  • Update documentation for flatbuffers -> json migration
@coder137
Copy link
Owner Author

coder137 commented Nov 2, 2022

#223 Initial JSON Serialization library + CustomGenerator addition
#224 Custom Generator unit tests

@coder137
Copy link
Owner Author

coder137 commented Nov 5, 2022

#225 JSON Serialization for Target

@coder137
Copy link
Owner Author

coder137 commented Nov 6, 2022

#226 Remove flatbuffer/flexbuffer usage and library from BuildCC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant