diff --git a/hwe/map_history.php b/hwe/map_history.php index 14003207..4f73dc6c 100644 --- a/hwe/map_history.php +++ b/hwe/map_history.php @@ -39,4 +39,4 @@ if(!$map){ ]); } -Json::die(Json::decode($map)); \ No newline at end of file +Json::die($map, Json::PASS_THROUGH); \ No newline at end of file diff --git a/src/sammo/Json.php b/src/sammo/Json.php index dd5e4a04..10fa3fc6 100644 --- a/src/sammo/Json.php +++ b/src/sammo/Json.php @@ -6,6 +6,7 @@ class Json const PRETTY = 1; const DELETE_NULL = 2; const NO_CACHE = 4; + const PASS_THROUGH = 8; public static function encode($value, $flag = 0) { @@ -33,6 +34,9 @@ class Json header('Content-Type: application/json'); + if($flag & static::PASS_THROUGH){ + die($value); + } die(Json::encode($value, $flag)); } }