MongoDB: Display arrays as JSON
This commit is contained in:
parent
c24a6a6aef
commit
f44f186b38
|
@ -66,7 +66,7 @@ if (isset($_GET["mongo"])) {
|
|||
(is_a($val, 'MongoDB\BSON\UTCDatetime') ? $val->toDateTime()->format('Y-m-d H:i:s') :
|
||||
(is_a($val, 'MongoDB\BSON\Binary') ? $val->getData() : //! allow downloading
|
||||
(is_a($val, 'MongoDB\BSON\Regex') ? strval($val) :
|
||||
(is_object($val) ? json_encode($val, 256) : // 256 = JSON_UNESCAPED_UNICODE
|
||||
(is_object($val) || is_array($val) ? json_encode($val, 256) : // 256 = JSON_UNESCAPED_UNICODE
|
||||
$val // MongoMinKey, MongoMaxKey
|
||||
)))));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue