code: func (adapter *Encoder) Encode(val interface{}) error {
  	adapter.stream.WriteVal(val)
  	adapter.stream.WriteRaw("\n")
  	adapter.stream.Flush()
  	return adapter.stream.Error
  }
docs: // Encode encode interface{} as JSON to io.Writer