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

Split out validators into a separate optional dependency project #142

Open geota opened 9 years ago

geota commented 9 years ago

I am trying to use json-schema-validator in an Android app and am currently hitting the 65k dex method limit. Working on splitting my app into multiple dex, but was taking a look at json-schema-validator's dependencies and noticed the dependencies on joda-time and javax.mail.

Looks like you use joda-time to verify "datetime" format and javax.mail to verify the "email" format. Could these and the other validators be split out into an optional dependency package? Implementations are not required to provide implementations for the formats included in draftv4 of the spec. This would allow users of your library to choose if they want to include the format validators and perhaps promote users to contribute back custom validators that could be generally useful.

geota commented 9 years ago

Has anyone been able to successfully use the validator in an Android app without hitting the dex method limit?

pfaffenrodt commented 8 years ago

We are facing the same problem. MultiDex is a pain. Let me know, if you found another solution.

To use this library in an android app this issue is critical. Removing dependencies would solve it.

pfaffenrodt commented 8 years ago

https://github.com/pfaffenrodt/json-schema-validator/tree/feature/support-android