Nathanmac\Utilities\Parser\Parser::json PHP Method

json() public method

JSON parser, helper function.
public json ( $payload ) : array
$payload
return array
    public function json($payload)
    {
        return $this->parse($payload, new JSON());
    }

Usage Example

Beispiel #1
0
 /** @test */
 public function throws_an_exception_when_parsed_json_bad_data()
 {
     $parser = new Parser();
     $this->setExpectedException('Exception', 'Failed To Parse JSON');
     $parser->json('as|df>ASFBw924hg2=');
 }
All Usage Examples Of Nathanmac\Utilities\Parser\Parser::json