java-json-tools / json-schema-validator

A JSON Schema validation implementation in pure Java, which aims for correctness and performance, in that order
http://json-schema-validator.herokuapp.com/
Other
1.62k stars 399 forks source link

Obtain JUST the message from a ValidationMessage? #412

Open ghost opened 4 months ago

ghost commented 4 months ago

Hello!

I am facing a rather strange issue: it seems to be not possible to return just the message part from a ValidationMessage. Calling .getMessage() or .toString() returns the JSONPath associated with the error, and then the message.

It is obviously possible to extract the message text from that by editing the string itself but that seems rather hacky. Is there a standard way to retrieve the bare message itself?