amazon-ion / ion-go

A Go implementation of Amazon Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
174 stars 31 forks source link

Marshalling Data Type Inputs as a Slice of Bytes #108

Open matthewh-BQ opened 4 years ago

matthewh-BQ commented 4 years ago

When marshalling data type inputs that are represented as a slice of bytes, distinction between which data type it is fails in two scenarios:

  1. Blob vs Clob. Blob and clob inputs are a slice of bytes and by default, this will be treated as a blob.
  2. List vs SExp. Like the above, a similar issue arises. Instead, the default will be lists.
fernomac commented 4 years ago

As with #107, my preference would be to add a MarshalAs equivalent of EncodeAs if this is something folks are running into.