Custom Format
April 27, 2020 ยท View on GitHub
Description
This code sample shows how to implement your own format attribute, which can be used as the value of "format" keyword in the schema definition.
The library core will load custom format attributes through Service Provider Interface in the run time.
For Java 9 and higher, module-info.java is the place where the implemented format attribute should be specified as a service provider.
provides org.leadpony.justify.spi.FormatAttribute
with your.own.CustomFormatAttribute;
For Java 8, META-INF/services directory must hava a file named as org.leadpony.justify.spi.FormatAttribute, which contains a following line:
your.own.CustomFormatAttribute
How to Build
Follow the instructions shown in README in the repository root.
How to Run
Navigate to the generated target or build directory.
$ ./run.sh words.schema.json words.json