decode

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(b []byte) (schema.Notebook, error)

Bytes decodes raw JSON bytes into a version-specific notebook representation.

func RegisterDecoder

func RegisterDecoder(v schema.Version, d Decoder)

RegisterDecoder for a schema version.

Types

type Decoder

type Decoder interface {
	DecodeMeta(data []byte) (schema.NotebookMetadata, error)
	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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL