Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDecoder ¶
RegisterDecoder for a schema version.
Types ¶
type Decoder ¶
type Decoder interface {
// ExtractCells accesses the array of notebook cells.
//
// Prior to v4.0 cells were not a part of the top level structure,
// and were contained in "worksheets" instead.
ExtractCells(data []byte) ([]json.RawMessage, error)
// DecodeMeta decodes version-specific metadata.
DecodeMeta(data []byte) (schema.NotebookMetadata, error)
// DecodeCell decodes raw cell data to a version-specific implementation.
DecodeCell(v map[string]interface{}, data []byte, meta schema.NotebookMetadata) (schema.Cell, error)
}
Decoder implementations are version-aware and decode cell contents and metadata based on the respective JSON schema definition.
Click to show internal directories.
Click to hide internal directories.