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
| Argument | Type | Description |
|---|---|---|
data | []byte | The data value. |
Returns
The declared result.
errorFull signature
func (document *Document[T]) UnmarshalJSON(data []byte) errorRelated types
DocumentThe exact generated Go value type for a versioned serialized Lexical document.