Provide Error Code along with error messages in output format
As a library user, it would be helpful if jschon can provide numeric error codes( and name if possible) in addition to the error messages in output format since we may have to translate the same in other languages.
- Current
errornode can point to error code instead of the message. titleanddescriptionannotations can be used to add more details of the error.
Prior art:
Additional context: https://github.com/json-schema-org/json-schema-spec/issues/1282
I'm inclined to concur with Greg Dennis's view in the linked issue - that the keyword itself (which can be inferred from keywordLocation) can effectively be taken to be the error code.
I do agree though that error messaging in jschon needs work, in terms of allowing customization and localization. I'll create a separate issue for this.
PS: The suggestions by Greg Dennis will only be reflected in the next version of JSON Schema.