protected static function parse($json, $assoc = false)
    {
        $falgs = JsonParser::DETECT_KEY_CONFLICTS;

        if ($assoc) {
            $falgs |= JsonParser::PARSE_TO_ASSOC;
        }

        $parser = new JsonParser();

        return $parser->parse($json, $falgs);
    }
protected static function parse($json, $assoc = false)
    {
        $falgs = JsonParser::DETECT_KEY_CONFLICTS;

        if ($assoc) {
            $falgs |= JsonParser::PARSE_TO_ASSOC;
        }

        $parser = new JsonParser();

        return $parser->parse($json, $falgs);
    }
protected static function parse ( $ json , $ assoc = false ) { $ falgs = JsonParser :: DETECT_KEY_CONFLICTS ; if ( $ assoc ) { $ falgs |= JsonParser :: PARSE_TO_ASSOC ; } $ parser = new JsonParser ( ) ; return $ parser -> parse ( $ json , $ falgs ) ; }
Converts JSON encoded string into a PHP variable.

@param string $json  JSON string
@param bool   $assoc returned objects will be converted into associative arrays

@return mixed the value encoded in json in appropriate PHP type

@throws ParsingException

@SuppressWarnings(PHPMD.BooleanArgumentFlag)
Converts JSON encoded string into a PHP variable .