Fork me on GitHub
Yehonathan Sharvit14:11:12

A question related to muuntaja: Do you guys think it's a good idea that by default keys in a JSON string are coerced to keywords?


This is a big case of "it depends". The differentiator for me is whether it's actually mean to be used as a keyword, or it's actually a string in they key position


I'm still dealing with tech debt from all keys as keywords by default, because of the weirdness you get with things like uuid ids getting converted to keywords, suddenly all the logic gets really weird


Yes. So long as the coercion can be switched off, default coercion to keywords fits my default approach

Yehonathan Sharvit14:11:40

I tend to think that it's a misused of Clojure keywords, as a the keys could be anything, including weird characters (e.g. whitespace) I know that Clojure keywords support whitespace but it's not advised to have werid characters in a keyword. As far as I understand it, Clojure keywords are meant to be used when the set of possible keys is well known in advance.

Yehonathan Sharvit14:11:27

It seems that the fact that keywords behave as functions in Clojure cause an overuse of keywords


Beginner question about Reitit on frontend: Can Reitit parse url query params, for example /widgets?color=blue&sort=newest ?


Most likely the answer is yes