DocumentJsonCodec class

Convert a document to or from JSON.

Inheritance

Constructors

DocumentJsonCodec({Iterable<TextAttributeCodec<TextAttribute>> attributes = const [], Iterable<LineModifierCodec<LineModifier>> lineModifiers = const [], Iterable<ParagraphEmbedCodec<ParagraphEmbed>> embeds = const []})
Create a codec to convert a document to or from JSON with codecs for attributes, line modifiers and embeds that are supported for conversion.
factory

Properties

decoder Converter<dynamic, Document>
Returns the decoder of this, converting from T to S.
no setteroverride
encoder Converter<Document, dynamic>
Returns the encoder from S to T.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<dynamic, Document>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(dynamic encoded) Document
Decodes encoded data.
inherited
encode(Document input) → dynamic
Encodes input.
inherited
fuse<R>(Codec<dynamic, R> other) Codec<Document, R>
Fuses this with other.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited