/**
 * Returns true if the string is JSON, false otherwise.
 *
 * @return bool Returns TRUE on success or FALSE otherwise.
 */
public function isJson(): bool

Examples

if (Strings::create('{"yaml": "json"}'))->isJson()) {
    // do something...
}

Getting Started

Methods