Class JsonParser
The parser for simpler JSON translation files.
Inherited Members
Namespace: Tlumach.Base
Assembly: Tlumach.Base.dll
Syntax
public class JsonParser : BaseJsonParser
Properties
TextProcessingMode
Gets or sets the text processing mode to use when decoding potentially escaped strings and when recognizing template strings in translation entries.
Declaration
public static TextFormat TextProcessingMode { get; set; }
Property Value
| Type | Description |
|---|---|
| TextFormat |
Methods
CanHandleExtension(string)
Checks whether this parser can handle a translation file with the given extension.
This method is not used for configuration files.
Declaration
public override bool CanHandleExtension(string fileExtension)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileExtension | The extension to check. |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
GetTextProcessingMode()
Declaration
protected override TextFormat GetTextProcessingMode()
Returns
| Type | Description |
|---|---|
| TextFormat |
Overrides
InternalLoadTranslationEntriesFromJSON(JsonElement, Translation?, string)
Declaration
protected override Translation InternalLoadTranslationEntriesFromJSON(JsonElement jsonObj, Translation? translation, string groupName)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonElement | jsonObj | |
| Translation | translation | |
| string | groupName |
Returns
| Type | Description |
|---|---|
| Translation |
Overrides
Use()
Initializes the parser class, making it available for use.
Declaration
public static void Use()