gitlab.com/ignitionrobotics/web/ign-go@v1.0.0-rc4/encoders/marshaler.go (about)

     1  package encoders
     2  
     3  // Marshaller marshals and unmarshals data to/from specific formats.
     4  type Marshaller interface {
     5  	// Marshal marshals the given data structure to a certain format and returns the representation in bytes.
     6  	Marshal(v interface{}) ([]byte, error)
     7  
     8  	// Unmarshal parses a byte representation of a given data in a certain format and loads v with matching parsed values.
     9  	Unmarshal(data []byte, v interface{}) error
    10  }