From 7954345cc44d9391bb0066a0a31da0cb6b391509 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 10 Sep 2021 13:59:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-message/Parse.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/http-message/Parse.php b/http-message/Parse.php index 32c7961c..bcfde118 100644 --- a/http-message/Parse.php +++ b/http-message/Parse.php @@ -16,9 +16,8 @@ class Parse public static function data($content, $contentType): mixed { if (str_contains($contentType, 'json')) { - return json_encode($content); + return json_encode($content,true); } - var_dump($contentType); if (str_contains($contentType, 'xml')) { return Xml::toArray($content); }