Author: Dhriti Shikhar
The process of converting an object into stream of bytes.
- To recreate the object whenever needed
- retain state of object
- provide storage of object
- to provide support for data exchange
- serialization format from Google
- its fast
This is the implementation of FlatBuffers in golang
-
Install flatbuffer from source. Reference --> https://rwinslow.com/posts/how-to-install-flatbuffers/
-
write a schema file. Here, myschema.fbs is the schema file. Run it using the command:
./flatbuffers/flatc -g myschema.fbs
where flatc is the binary
-
write your program in main.go
-
run it using the command:
GOPATH=$(pwd) go run main.go