The JSON parser is used to reset the stream with a Reset Timeout setting if a malformed JSON has been sent. For example, if the stream starts with {
and the closing }
is never sent, the parser will otherwise continue to wait for the closing bracket. The timeout resets the stream so it is no longer waiting for the closing bracket.
Param name | Mandatory | Description | Default Value | Possible Value |
---|---|---|---|---|
Encoding | Yes | Source encoding of the message coming from the automation system. | utf-8 |
|
Reset Timeout (Sec) | Yes | The reset timeout. |
| 1 or higher. |
KeyMappings | Yes | A mapping of the RAS message key-values to a dictionary of key-values. |
|
|
Key Mapping
Param name | Mandatory | Description | Possible Value |
---|---|---|---|
Source | Yes | The name of the field in the original RAS message. | Not null. |
Destination | Yes | The name that will be assigned to this RAS field. | Not null. |
Example XML:
<JsonParser>
<Encoding>utf-8</Encoding>
<KeyMappings>
<KeyMapping source="params.current."titleName.s"" dest="title" />
<KeyMapping source="params.current."artistName.s"" dest="artist" />
<KeyMapping source="params.current.mix."duration.msec.i"" dest="length" />
<KeyMapping source="params.current.categoryId" dest="category" />
</KeyMappings>
<ResetTimeoutSec>1500</ResetTimeoutSec>
</JsonParser>