The Key Value Parser is useful for formats like AudioVault that use key=value format (e.g.: CutID=2038-01 Type=MUS ArtistName=Deftones SongTitle=Minerva Duration=00:04:15
).
Param name | Mandatory | Description | Default Value | Possible Value |
---|---|---|---|---|
Encoding | Yes | Source encoding of the message coming from the automation system. | utf-8 |
|
StartBytes | No | Bytes delimiting the beginning of a valid message. Any bytes before this will be discarded. |
| Bytes, in hexadecimal notation. |
EndBytes | No | Bytes delimiting the end of a valid message. |
| Bytes, in hexadecimal notation. |
FirstKey | Yes | First key in the list of key-values the automation system provides. |
| Not null. |
LastKey | Yes | Last key in the list of key-values the automation system provides. |
| Not null. |
Associator | Yes | Characters used as an association of key to value (eg: Artist=Madonna~Title=Holiday). |
|
|
Separator | Yes | Characters used to delimit key-value pairs (eg: Artist=Madonna~Title=Holiday). |
|
|
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:
<KeyValueParser>
<StartBytes>5E</StartBytes>
<EndBytes>0A</EndBytes>
<FirstKey>CutID</FirstKey>
<LastKey>Duration</LastKey>
<Separator> </Separator>
<Associator>=</Associator>
<Terminator>
</Terminator>
<Encoding>utf-8</Encoding>
<KeyMappings>
<KeyMapping source="ArtistName" dest="artist" />
<KeyMapping source="SongTitle" dest="title" />
<KeyMapping source="Duration" dest="length" />
<KeyMapping source="Type" dest="category" />
<KeyMapping source="CutID" dest="cartNumber" />
</KeyMappings>
</KeyValueParser>