From the course: Beginner's Guide to Go Protocol Buffer
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Protobuf vs. JSON - Go Tutorial
From the course: Beginner's Guide to Go Protocol Buffer
Protobuf vs. JSON
- [Instructor] There are various ways that we can serialize and deserialize data for transport or storage. These include but are not limited to XML, YAML, JSON, and protobufs. Google initially created protocol buffers to be simpler, smaller, more maintainable, and faster than XML, but discovered that protobufs actually beat out JSON as well. So what are the differences between JSON and protobufs? JSON uses text to define data, whereas protobuf uses binary message format to define a schema for data. You can also use JSON to define schema, but must write code in your service to enforce it. JSON is very popular and has support in almost every language. It's human-readable, widely supported. And since it's extremely popular, a lot of help and support can be found easily online. Protocol buffers are growing in support for internal communication between services. It's faster. It supports RPC. And has automatic…