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

* [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.
This commit is contained in:
Andrei Burdulescu
2022-08-08 21:30:06 +03:00
committed by GitHub
parent ee2ced236d
commit c793621567
13 changed files with 151 additions and 120 deletions

View File

@@ -7,7 +7,7 @@ import (
)
type StructOfStructsOfStructsT struct {
A *StructOfStructsT
A *StructOfStructsT `json:"a"`
}
func (t *StructOfStructsOfStructsT) Pack(builder *flatbuffers.Builder) flatbuffers.UOffsetT {