This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-23
Channels
- # beginners (114)
- # cljsrn (19)
- # clojure (35)
- # clojure-austin (1)
- # clojure-italy (9)
- # clojure-russia (8)
- # clojure-spec (6)
- # clojure-uk (5)
- # clojurescript (32)
- # datomic (12)
- # editors (3)
- # emacs (1)
- # hoplon (4)
- # jobs (6)
- # jobs-discuss (1)
- # luminus (2)
- # onyx (11)
- # parinfer (2)
- # portkey (6)
- # re-frame (7)
- # reagent (9)
- # remote-jobs (3)
- # schema (2)
- # shadow-cljs (23)
- # spacemacs (2)
- # specter (13)
- # vim (3)
- # yada (6)
There could be s/recursive
too, some discussion in https://github.com/metosin/schema-tools/issues/30. If you end up with good solution, PR would be most welcome there.
Thanks, I was not aware of s/recursive
.
I am ending up checking known schema records, so I am not entirely satisfied (and still miss edge cases). It also means I have to extract the data from some of them (`s/if` and probably others).
I also gave up on "unflatten" for a schema, since I loose some information (in my case I stringify the keywords and loose the optional-key
position, and some things like the s/if
predicates are lost. Although this could still be done for "simple" shemas if I kept an array of keywords).
So, still thinking about it but I don't think there is a general solution that would allow to roundtrip between flatten/unflatten (at least not without metadata and I am not willing to go there).