Open Ting-Yu opened 3 years ago
src/Common/Common.php
protected static function safeJson($jsonData, $asArray = false) { $jsonData = json_decode($jsonData, true); $safeJsonData = []; if (!is_array($jsonData)) { return $jsonData; } foreach ($jsonData as $key => $value) { if (self::is_json($value)) { $safeJsonData[$key] = self::safeJson($value, true); if (gettype($safeJsonData[$key]) != gettype($value)) { $safeJsonData[$key] = $value; } } elseif (is_string($value)) { $safeJsonData[$key] = self::safeJsonString($value); } elseif (is_array($value)) { $safeJsonData[$key] = self::safeJson(json_encode($value), true); } else { $safeJsonData[$key] = $value; } } return $asArray ? $safeJsonData : json_encode($safeJsonData); }
@mehmetbeyHZ
@Ting-Yu Can you send details? json data, db Pgsql - Mysql and Columns, errors .. etc
src/Common/Common.php