JsonText Class

A renderable piece of JSON text.
public sealed class JsonText : JustInTimeRenderable, IRenderable

Constructors

JsonText(string)
Initializes a new instance of the JsonText class.

Properties

Style BooleanStyle
Gets or sets the style used for boolean literals.
Style BracesStyle
Gets or sets the style used for braces.
Style BracketsStyle
Gets or sets the style used for brackets.
Style ColonStyle
Gets or sets the style used for colons.
Style CommaStyle
Gets or sets the style used for commas.
Style MemberStyle
Gets or sets the style used for member names.
Style NullStyle
Gets or sets the style used for null literals.
Style NumberStyle
Gets or sets the style used for number literals.
IJsonParser Parser
Gets or sets the JSON parser.
Style StringStyle
Gets or sets the style used for string literals.

Methods

protected override IRenderable Build()
Builds the inner renderable.
protected virtual bool HasDirtyChildren()
Checks if there are any children that has changed. If so, the underlying renderable needs rebuilding.
protected void MarkAsDirty()
Marks this instance as dirty.
protected void MarkAsDirty(Action)
Marks this instance as dirty.
protected override Measurement Measure(RenderOptions, int)
Measures the renderable object.
protected override IEnumerable<Segment> Render(RenderOptions, int)
Renders the object.

Extension Methods

JsonText BooleanColor(Color)
Sets the color used for boolean literals.
JsonText BooleanStyle(Style)
Sets the style used for boolean literals.
JsonText BracesColor(Color)
Sets the color used for braces.
JsonText BracesStyle(Style)
Sets the style used for braces.
JsonText BracketColor(Color)
Sets the color used for brackets.
JsonText BracketStyle(Style)
Sets the style used for brackets.
JsonText ColonColor(Color)
Sets the color used for colons.
JsonText ColonStyle(Style)
Sets the style used for colons.
JsonText CommaColor(Color)
Sets the color used for commas.
JsonText CommaStyle(Style)
Sets the style used for commas.
IEnumerable<Segment> GetSegments(IAnsiConsole)
Gets the segments for a renderable using the specified console.
JsonText MemberColor(Color)
Sets the color used for member names.
JsonText MemberStyle(Style)
Sets the style used for member names.
JsonText NullColor(Color)
Sets the color used for null literals.
JsonText NullStyle(Style)
Sets the style used for null literals.
JsonText NumberColor(Color)
Sets the color used for number literals.
JsonText NumberStyle(Style)
Sets the style used for number literals.
JsonText StringColor(Color)
Sets the color used for string literals.
JsonText StringStyle(Style)
Sets the style used for string literals.