Skip to content

Commit 3526ec4

Browse files
committed
[skip ci] fix formatting
1 parent dbe045a commit 3526ec4

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ var_dump($isValid); // true
6969

7070
// Parsing a JSON string. similar to the json_decode() function but without the fourth argument
7171
try {
72-
$parsedJSON = simdjson_decode($jsonString, true, 512); //return array|object|null. "null" string is not a standard json
72+
// returns array|stdClass|string|float|int|bool|null.
73+
$parsedJSON = simdjson_decode($jsonString, true, 512);
7374
var_dump($parsedJSON); // PHP array
7475
} catch (RuntimeException $e) {
7576
echo "Failed to parse $jsonString: {$e->getMessage()}\n";
@@ -140,7 +141,8 @@ function simdjson_is_valid(string $json, int $depth = 512) : bool {}
140141
* @param string $json The JSON string being decoded
141142
* @param string $key The JSON pointer being requested
142143
* @param int $depth The maximum nesting depth of the structure being decoded.
143-
* @param bool $throw_if_uncountable If true, then throw SimdJsonException instead of returning 0 for JSON pointers
144+
* @param bool $throw_if_uncountable If true, then throw SimdJsonException instead of
145+
returning 0 for JSON pointers
144146
to values that are neither objects nor arrays.
145147
* @return int
146148
* @throws SimdJsonException for invalid JSON or invalid JSON pointer

0 commit comments

Comments
 (0)