kant1/php-jsonschema-resolver

Simple JSON Schema parser which resolve the ref operator

1.0.0 2016-11-18 08:33 UTC

This package is not auto-updated.

Last update: 2024-05-11 18:00:50 UTC


README

This package allow you to parse a JSONSchema file and it can resolve the "$ref" operator.

<?php
require_once __DIR__.'/vendor/autoload.php';

$json = Kant1\JSONElement::fromFile(__DIR__.'/json/simple.json');

foreach($json['paths'] as $url=>$d){
    print $url." : ";
    foreach($d as $method=>$d){
        print $method."\n";
    }
}