Mecha CMS

To::JSON()

Convert PHP value into JSON.

2.0.0Static

To::JSON($in, $tidy = false);

Example:

$A = To::JSON(['foo' => 'bar']);

Result:

$A = '{"foo":"bar"}';