Removing obsolete unused stuff

This commit is contained in:
Pavel Shevaev 2023-06-02 15:57:07 +03:00
parent f5999339dd
commit 4f56388218
1 changed files with 0 additions and 39 deletions

View File

@ -665,45 +665,6 @@ function git_try_commit($files, $msg)
}
}
function decode_json_ensure($json, $assoc = false)
{
$res = json_decode($json, $assoc);
if($res === null)
{
$parser = new JsonParser();
$err = $parser->lint($json);
echo $json;
throw $err;
}
return $res;
}
function convert_js_to_msgpack($file, $bin_file)
{
$bin_file = "$file.lib";
if(need_to_regen($bin_file, array($file)))
{
echo "Converting $file -> $bin_file...\n";
$data = decode_json_ensure(file_get_contents($file));
$msg = config_msgpack_pack($data);
ensure_write($bin_file, $msg);
}
return true;
}
function check_and_decode_json($json)
{
try
{
$arr = decode_json_ensure($json, true);
return array(0, "", $arr);
}
catch(Exception $e)
{
return array(1, $e->getMessage(), array());
}
}
function check_and_decode_jzon($json)
{
try