JsonHelper::encode()
\nn\t3::JsonHelper()->encode($var);
Converts a variable into JSON format.
Relic of the original class, probably from a time when json_encode() did not yet exist.
\Nng\Nnhelpers\Helpers\JsonHelper::encode(['a'=>1, 'b'=>2]);
Copied!
| @return string;
Source Code
public static function encode($var) {
return json_encode( $var );
}
Copied!