Class ArbParser
A parser for files in Arb format (JSON with extra features).
public class ArbParser : BaseJsonParser
- Inheritance
-
ArbParser
- Inherited Members
Properties
TextProcessingMode
Gets or sets the text processing mode to use when decoding potentially escaped strings and when recognizing template strings in translation entries.
public static TextFormat TextProcessingMode { get; set; }
Property Value
Methods
CanHandleExtension(string)
Checks whether this parser can handle a translation file with the given extension.
This method is not used for configuration files.
public override bool CanHandleExtension(string fileExtension)
Parameters
fileExtensionstringThe extension to check.
Returns
GetTextProcessingMode()
Used for internal needs.
protected override TextFormat GetTextProcessingMode()
Returns
- TextFormat
The effective text processing mode.
InternalLoadTranslationEntriesFromJSON(JsonElement, Translation?, string, TextFormat?)
protected override Translation InternalLoadTranslationEntriesFromJSON(JsonElement jsonObj, Translation? translation, string groupName, TextFormat? textProcessingMode)
Parameters
jsonObjJsonElementtranslationTranslationgroupNamestringtextProcessingModeTextFormat?
Returns
InternalLoadTranslationStructure(string, TextFormat?)
Loads the keys from the default translation file and builds a tree of keys.
protected override TranslationTree? InternalLoadTranslationStructure(string content, TextFormat? textProcessingMode)
Parameters
contentstringThe content to parse.
textProcessingModeTextFormat?The mode of processing of the text of the default file.
Returns
- TranslationTree
The constructed TranslationTree upon success or null otherwise.
Exceptions
- TextParseException
Gets thrown when parsing of a default translation file fails.
ShouldSkipObjectProperty(string)
protected override bool? ShouldSkipObjectProperty(string key)
Parameters
keystring
Returns
- bool?
ShouldSkipStringProperty(string)
protected override bool? ShouldSkipStringProperty(string key)
Parameters
keystring
Returns
- bool?
Use()
Initializes the parser class, making it available for use.
public static void Use()