storejson

Table of Contents

Prototype: storejson(data_container)

Return type: string

Description: Converts a data container to a JSON string.

Arguments:

  • data_container: string, in the range: [a-zA-Z0-9_$(){}\[\].:]+

Example:

   vars:

      "loadthis"
         data =>  readjson("/tmp/data.json", 4000);
      "andback"
         string =>  storejson(loadthis);
   reports:
      "Converted /tmp/data.json to '$(andback)'";

See also: readjson(), readyaml(), parsejson(), parseyaml(), and data documentation.