Json.php
397 字节
<?php
namespace Lackoxygen\TopWarehouse\Utils;
class Json
{
public static function encode($array, int $flags = JSON_UNESCAPED_UNICODE, int $depth = 512)
{
return json_encode($array, $flags, $depth);
}
public static function decode(string $json, ?bool $associative = true, int $depth = 512): array
{
return json_decode($json, $associative, $depth);
}
}