Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. JsonParser.php

function JsonParser::lint

@phpstan-param int-mask-of<self::*> $flags

Parameters

string $input JSON string:

int $flags Bitmask of parse/lint options (see constants of this class):

Return value

null|ParsingException null if no error is found, a ParsingException containing all details otherwise

File

vendor/seld/jsonlint/src/Seld/JsonLint/JsonParser.php, line 185

Class

JsonParser
Parser class

Namespace

Seld\JsonLint

Code

public function lint($input, $flags = 0) {
    try {
        $this->parse($input, $flags);
    } catch (ParsingException $e) {
        return $e;
    }
    return null;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal