content.addParser()
Register a parser for one or more file extensions.
content.addParser(extensions, parse)
Registers a Parser for one or more file extensions, so those files become documents. Used by the json and yaml plugins.
Parameters:
extensions: an array of dotted extensions, e.g.['.json'].parse: aParserfunction.
Returns: void
Usage
usage.ts
content.addParser(['.json'], parseJson)