metosin/malli

Feature: Using Java classes as schemas

開放

#1,007 建立於 2024年2月2日

 (5 則留言) (1 個反應) (0 位負責人)Clojure (237 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (1,724 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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

貢獻者指南