kant1/php-jsonschema-resolver

简单的JSON Schema解析器,能够解析ref运算符

1.0.0 2016-11-18 08:33 UTC

This package is not auto-updated.

Last update: 2024-09-14 20:04:07 UTC


README

此包允许您解析JSONSchema文件,并且可以解析"$ref"运算符。

<?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";
    }
}