Skip to content
ConsoleMonster
Class

JsonHighlighter

ConsoleMonster.Highlighting

Namespace
ConsoleMonster.Highlighting
Assembly
ConsoleMonster
Modifiers
sealed

JSON (and JSONC comments): keys, strings, numbers, true/false/null, punctuation; anything else is an error.

Inheritance

  • object
  • JsonHighlighter

Constructors

public JsonHighlighter() #

Methods

public IReadOnlyList<HighlightToken> Tokenize(string text) #

Tokenizes text.

Parameters

text string required
The text (any line endings).

Returns

IReadOnlyList<HighlightToken> The tokens, in order and not overlapping.

Properties

public string Name { get; } #

The language name, for example "json" (lower case).