Next: , Up: Writers   [Contents]


6.6.1 json-writer

<writer id="out-json" plugin="json-writer" transport="file-out">
  <write-attempts>3</write-attempts>
  <template><![CDATA[
{ "setpoint": 0, "mode": "auto" }
]]></template>
  <map datapoint="out-setpoint" path="$.setpoint"/>
  <map datapoint="out-mode" path="$.mode"/>
</writer>

<template> must be valid JSON. Maps update simple $.a.b paths (no filters or array indices). The same path may be driven by several datapoints: each value-changed writes that path (last writer wins for overlapping updates). Optional <value-to-text> per map (at most one).