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

[golang] Add support for text parsing with json struct tags #7353

Merged
merged 3 commits into from
Aug 8, 2022
Merged

[golang] Add support for text parsing with json struct tags #7353

merged 3 commits into from
Aug 8, 2022

Conversation

aburdulescu
Copy link
Contributor

@aburdulescu aburdulescu commented Jun 16, 2022

Add struct tags to Go native structs generated when object API is used.

This allows to use the same JSON file as for C++ text
parsing(i.e. snake_case vs CamelCase) and thus enabling text parsing
for Go(when using object API).

See also issue #7004

Add struct tags to Go native structs generated when object API is used.

This allows to use the same JSON file as for C++ text
parsing(i.e. snake_case vs CamelCase) and thus enabling text parsing
for Go(when using object API).
@google-cla
Copy link

google-cla bot commented Jun 16, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added c++ codegen Involving generating code from schema golang labels Jun 16, 2022
Added small test to check and demonstrate text parsing in Go.
Also, ran clang-format on cpp file changes.
@dbaileychess
Copy link
Collaborator

@CasperN Do you know Go?

@dbaileychess
Copy link
Collaborator

This LGTM, though I don't know Golang. Since it is a fairly simple change, if it does break people we can revert it easily enough. Thanks!

@dbaileychess dbaileychess merged commit c793621 into google:master Aug 8, 2022
jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
)

* [golang] Add support for text parsing with json struct tags

Add struct tags to Go native structs generated when object API is used.

This allows to use the same JSON file as for C++ text
parsing(i.e. snake_case vs CamelCase) and thus enabling text parsing
for Go(when using object API).

* [golang] Add test for text parsing

Added small test to check and demonstrate text parsing in Go.
Also, ran clang-format on cpp file changes.
jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
)

* [golang] Add support for text parsing with json struct tags

Add struct tags to Go native structs generated when object API is used.

This allows to use the same JSON file as for C++ text
parsing(i.e. snake_case vs CamelCase) and thus enabling text parsing
for Go(when using object API).

* [golang] Add test for text parsing

Added small test to check and demonstrate text parsing in Go.
Also, ran clang-format on cpp file changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema golang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants