PHP code example of arfeen / json-schema-validator

1. Go to this page and download the library: Download arfeen/json-schema-validator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arfeen / json-schema-validator example snippets




	$jsonschemavalidator = new JsonSchemaValidator();
	$jsonschemavalidator->validateSchema($_payLoadSchema, $json_raw);
	
	if($validated){
		echo "JSON Validated";
	} else {
		echo "JSON not validated";
		print_r($jsonschemavalidator->getErrors());
	}