hasbridge/php-json-schema — pull request #1 by pdaoust (2011-12-31 05:49:23+00:00)
Title: Added support for patternProperties. The way it does this is to collect ...

...all checked properties (from both properties and patternProperties) in a $checkedProperties array. Then it does the array_diff, as you did before, but instead it checks the original list of properties against the list of checked properties to see if there's any left over. Then if additionalProperties is false, it'll fail, and if additionalProperties is a schema, it'll check each additional property against it. NOTE: I did not do any unit testing; I didn't even check to see if there's any syntax errors, but I just thought I'd rough it out for ya. Enjoy!