AnnotatedText

com.alecdorrington.annotatedtextformat.AnnotatedText
See theAnnotatedText companion class
object AnnotatedText

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fitting[A](text: String, annotations: List[Annotation[A]]): AnnotatedText[A]

text, with those of annotations that fit it, the rest left out. It only checks them, and moves none: annotations of a text since edited must first be carried to where they stand in it, after which some may no longer fit, as those whose words were edited away.

text, with those of annotations that fit it, the rest left out. It only checks them, and moves none: annotations of a text since edited must first be carried to where they stand in it, after which some may no longer fit, as those whose words were edited away.

Attributes

def of[A](text: String, annotations: List[Annotation[A]]): Either[List[Problem], AnnotatedText[A]]

text, with annotations, if they fit it, or else what is wrong.

text, with annotations, if they fit it, or else what is wrong.

Attributes

def plain(text: String): AnnotatedText[Nothing]

text, with no annotations.

text, with no annotations.

Attributes

def schema(value: Json): Json

The JSON Schema of an annotated text whose values conform to the schema value, whose definitions are lifted to its root, as JsonSchema.around describes.

The JSON Schema of an annotated text whose values conform to the schema value, whose definitions are lifted to its root, as JsonSchema.around describes.

Attributes

Givens

Givens

given given_Decoder_AnnotatedText: [A : Decoder] => Decoder[AnnotatedText[A]]

An annotated text, refused unless its annotations fit its text.

An annotated text, refused unless its annotations fit its text.

Attributes

given given_Encoder_AnnotatedText: [A : Encoder] => Encoder[AnnotatedText[A]]

An annotated text as {"text": ..., "annotations": [...]}.

An annotated text as {"text": ..., "annotations": [...]}.

Attributes