github.com/Ingenico-ePayments/connect-sdk-go@v0.0.0-20240318153750-1f8cd329b9c9/communicator/Marshaller.go (about) 1 package communicator 2 3 import "io" 4 5 // Marshaller is the interface used to marshal and unmarshal Ingenico ePayments platform request 6 // and response objects to and from JSON. Thread-safe. 7 type Marshaller interface { 8 // Marshal converts a request object to a JSON string. 9 Marshal(interface{}) (string, error) 10 11 // Unmarshal converts a JSON string to a response object. 12 Unmarshal(string, interface{}) error 13 14 // UnmarshalFromReader converts the contents from an io.Reader to a response object. 15 UnmarshalFromReader(io.Reader, interface{}) error 16 }