This file ( 470B ) exceeds the allowed full mode (48 kb) size.
The editor full hight is disabled, only scrolling is allowed..
If you wish to edit a file, it is recommended to use the scroll mode as some users do not like the full height
mode, although some users like it.
<?php
namespace Lib;
class Json
{
// encodes and indents a json string
public static function encode($json)
{
return json_encode($json);
}
public static function decode($json)
{
return json_decode($json, true);
}
public static function get_var($var_name, $o, $add_var_text = true)
{
if ($add_var_text) {
echo 'var ';
}
echo $var_name . ' = ' . Json::encode($o) . ';';
}
}