Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONStreamDecoder ¶
type JSONStreamDecoder struct {
// contains filtered or unexported fields
}
JSONStreamDecoder incrementally decodes JSON objects and emits plain text representations of their values. The decoder is tolerant to truncated payloads and will emit any partial content it was able to decode before returning an error.
func NewJSONStreamDecoder ¶
func NewJSONStreamDecoder(r io.Reader) *JSONStreamDecoder
NewJSONStreamDecoder creates a JSONStreamDecoder that reads tokens from r.
type PartialJSONError ¶
type PartialJSONError struct {
Err error
}
PartialJSONError indicates that the decoder encountered an error after emitting at least one chunk of output.
func (*PartialJSONError) Error ¶
func (e *PartialJSONError) Error() string
Error implements the error interface.
func (*PartialJSONError) Partial ¶
func (e *PartialJSONError) Partial() bool
Partial reports that some output was emitted before the error occurred.
func (*PartialJSONError) Unwrap ¶
func (e *PartialJSONError) Unwrap() error
Unwrap returns the wrapped error.
Click to show internal directories.
Click to hide internal directories.