Add error event on parser, improve JSON schema tests.