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.
파일 보기 프로젝트 열기: dantleech/phpbench 1 사용 예제들

공개 메소드들

메소드 설명
__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