method

Document.UnmarshalJSON

UnmarshalJSON rejects unsupported documents rather than dropping historical content while decoding. Export/migration tools should retain raw JSON when a typed decoder returns an error.

Arguments

ArgumentTypeDescription
data[]byteThe data value.

Returns

The declared result.

error

Full signature

func (document *Document[T]) UnmarshalJSON(data []byte) error

Source plugins/richtext/document.go:89

Related types

  • Document

    The exact generated Go value type for a versioned serialized Lexical document.