This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-15
Channels
- # beginners (15)
- # boot (4)
- # cider (1)
- # cljsrn (16)
- # clojars (1)
- # clojure (92)
- # clojure-india (3)
- # clojure-russia (27)
- # clojure-spec (9)
- # clojure-uk (5)
- # clojurescript (73)
- # cursive (28)
- # datascript (10)
- # emacs (1)
- # events (5)
- # hoplon (1)
- # instaparse (7)
- # juxt (2)
- # klipse (13)
- # lumo (17)
- # off-topic (166)
- # onyx (4)
- # protorepl (5)
- # re-frame (5)
- # reagent (13)
- # rum (26)
- # untangled (17)
- # yada (3)
I am looking for a way to check if json that I am getting conforms to clojure spec. Problem is spec requires keys to be localized like ::a ::b , but when I use cheshire I get :a 😛. I am currently using clojure.spec/valid? to check if json conforms to spec is there something else I should be using?
Ou, your right! I tried it before and in specified :req-un [:a :b] and it failed. I just tried it using :req-un [::a ::b] and it worked. Thx
Is there any convention on how to keep your spec descriptions, should they be separated from the code or intermingled? If intermingled, should it be at the top of the file or before using a var and function that was described?
algiras: It's still being determined. Different people have some different preference, but no way is ideal yet, they each have different trade offs.
Thx for the reply. Hope until Clojure 1.9 stable release there will be some common good practices.
I haven’t used it personally, but I remember this reddit thread discussing some conventions: https://www.reddit.com/r/Clojure/comments/5ewv8f/spec_and_code_organization/
Cool thx, hope at the near future I will have enough knowledge to contribute to these discussion.
I'm reading some code that has (.. Config. <stuff> )
, what exactly is that first ..
?
Is it this? (.. Config. (a) (b) (c option))
=> Config.a().b().c(option)
it's like -> but only for method calls, so yes
@josh.freckleton amazingly (doc ..)
works
(not sarcastic, I wanted to double check something as syntaxy as that would have docs)