Utility/JsonValidator.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\JsonValidator

Package: Default

Methods

methodpublicvalidate( $string, boolean $throwException = true) : boolean
static

Validate if a given string is a non-emtpy JSON format so we can convert it to an object array

Parameters
NameTypeDescription
$string
$throwExceptionboolean

flag : true throw an exception if the string is invalid JSON, false omit the exception

Returns
TypeDescription
booleanTrue if the string is a valid JSON; false otherwise
Documentation was generated by phpDocumentor 2.8.5.