docs.roxen.comView this page in a printer friendly mode
DocsRoxenWebServer 6.1Web Developer ManualVariable Tags
Copyright  2018, Roxen Internet Software
Suggestions, comments & compliments
manuals@roxen.com
 DEMO  DOCS  PIKE
 COMMUNITY  DOWNLOAD
www.roxen.com



<append>
<copy-scope>
<dec>
<define>
<elements>
<inc>
<insert>
<insert cached-href>
<insert file>
<insert href>
<insert realfile>
<insert scopes>
<insert variable>
<insert variables>
<json-format>
<json-parse>
<range>
<recaptcha-site-key>
<roxen-automatic-charset-variable>
<scope>
<set>
<sprintf>
<sscanf>
<undefine>
<unset>
<use>
<value>
<vform>

<json-format></json-format>

Provided by module: Tags: RXML tags

Formats a JSON string. The input value may be a number, string, array, mapping, or one of the special values &roxen.true;, &roxen.false;, or &roxen.null;.

Note: In some cases it may be easier to write the JSON answer as a plain string and substitute some values into it. In that case, the "json" encoding is more useful:

{"user": "&var.username:json;", "name": "&var.fullname:json;"}

Attributes

value="string"

The value to format.


variable="string"

Get the value to format from this variable, unless value has been provided. If neither is specified the content of the container is used.


ascii-only

Set to generate JSON output where all non-ASCII characters are escaped. If not set only required characters are escaped.


human-readable

Set to generate JSON output with extra whitespace for easier reading.


canonical="pike"

Use canonical="pike" to generate JSON output where the same input always gives consistent output with regards to e.g. mapping sorting. If not provided the order is undefined.


no-xml-quote

Set to skip escaping of XML markup characters (&, < and >). The standard behavior is to escape these characters using \uXXXX encoding.