PHP Класс PhpBench\Json\JsonDecoder

Accepts non-strict "JSON": - {this: ["is": {where: "sparta"}]} # quoteless keys are allowed - this: ["is": {where: "sparta"}] # enclosing braces can be omitted Lints the JSON using the JsonParser.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( )
decode ( string $jsonString ) : array Normalize, parse and decode the given JSON(ish) encoded string into an array.

Приватные методы

Метод Описание
normalize ( $jsonString ) Allow "non-strict" JSON - i.e. if no quotes are provided then try and add them.

Описание методов

__construct() публичный Метод

public __construct ( )

decode() публичный Метод

Normalize, parse and decode the given JSON(ish) encoded string into an array.
public decode ( string $jsonString ) : array
$jsonString string
Результат array