Replace `DecodeSchema` and `DecodeSchemaJSON` with custom Decoder
bminer opened this issue · comments
Blake Miner commented
Replace DecodeSchema
and DecodeSchemaJSON
with something like NewSchemaDecoder
and NewJSONSchemaDecoder
.
I'd like to mirror the JSON decoder API to provide a Buffered()
method that returns an io.Reader
.
- func (Decoder) Buffered() bufio.Reader
- func (Decoder) Decode() (Schema, error)
This makes it clearer that the io.Reader
is a buffered reader, and it exposes the buffered but unconsumed contents of the Reader.