The Go SDK currently fails to unmarshal JSON types into a byte, but should succeed and return the raw bytes.
I'm not sure if you're planning to handle the subdoc cases in this ticket, but there's also a marshalling scenario to go along with the unmarshalling case:
If the incoming value is already byte, can we skip the marshal and pass through as-is? That would allow us to write xattrs that are already marshalled to byte.
Hey Adam Fraser,
We indeed would go both ways with it.
Build 5.0.0-2592 contains gocb commit 92706fe26b36a706406fb2391d7c3c90ddddf81b with commit message:
GOCBC-183: Add support for access raw sub-document bytes.