metosin/malli

Feature: Using Java classes as schemas

Open

#1007 aperta il 2 feb 2024

Vedi su GitHub
 (5 commenti) (1 reazione) (0 assegnatari)Clojure (237 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (1724 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Occasionally, it is necessary to drop down to Java interop. When that happens, I don't want to lose the ease and simplicity of Malli's validation, and I don't want to have to write my own custom :fn schema each time merely to call (instance? SomeClass value).

It would be helpful to have support for recognizing Java classes, effectively wrapping instance? for general use. I looked at the malli.core code and I'm not entirely sure how to accomplish this or I'd offer to do it.

Thanks so much

Guida contributor