composer/composer — pull request #151 by digitalkaoz (2011-12-09 11:44:02+00:00)
Title: Json schema validator

this PR fixes #35 and #36

for json ``syntax`` and ``schema`` validation we use [this library] (https://github.com/justinrainbow/json-schema)
i included it as a vendor in ``composer.json``

we do ``composer.json`` validation only for the local file, the ``::parseJson()`` function now has a switch to trigger validation, we cant use validation always because this function is called multiple times internally with different json strings (**not always a composer.json**)

if the ``composer.json`` is invalid, we mostly get a detailed information whats wrong...

i had to fix both ``composer.json`` and ``composer.schema.json`` to match the validation

it worked pretty well in my tests