http://golang.org/pkg/encoding/json/
Marshal, unmarshal, marshaler. Very confused. Never heard of such terms in this context.
Go's terminology calls marshal the process of generating a JSON string from a data structure, and unmarshal the act of parsing JSON to a data structure.
It allows you to do encoding of JSON data as defined in the RFC 7159. When working with data we usually want to encode some Go struct into a json string. However the Go standard library encoding/json package allows us to encode any data type into a JSON string.
6 months ago. by John Otieno. Marshaling refers to transforming an object into a specific data format that is suitable for transmission. JSON is one of the most popular data interchange formats.
Marshalling and unmarshalling is used both on the client and server side. On the server side it is used to map an incoming request to a Scala or Java object and to map a Scala or Java object to an outgoing response.
From wikipedia article on Marshalling,
Marshalling (sometimes spelled marshaling with a single l) is the process of transforming the memory representation of an object to a data format suitable for storage or transmission.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With