IsJson
class IsJson extends StringComparator (View source)
Checks if a string is a valid JSON string.
Traits
Methods
__construct(int $depth = 512, int $flags = 0)
No description
bool
checkString(string $value)
Compare the input string against the comparator.
Details
__construct(int $depth = 512, int $flags = 0)
No description
final bool
__invoke(mixed $value)
Compare the input value against the comparator.
final bool
check(mixed $value)
Compare the input string against the comparator.
protected bool
checkString(string $value)
Compare the input string against the comparator.
static IsJson
make(int $depth = 512, int $flags = 0)
No description
protected string
resolveStringInput(mixed $value)
No description