Closed thorgisl closed 9 years ago
A small comment: you don't actually need the (is_tuple data) test in the guard as it it implicit in the (element 1 data) call. You do not get errors inside a guard, the guard only fails which makes this safe to do. Outside of the guard you might need such a test. The difference in efficiency is very small.
@rvirding Oh, very nice. Will update the PR ...
Btw, this is the LFE JSON library: https://github.com/thorgisl/ljson
I think we should start using maps to represent json structures in LFE, it is becoming the norm now. Try looking at the jsxn library, which is built on top of jsx.
On 25 October 2014 21:15, Dreki Þórgísl notifications@github.com wrote:
Btw, this is the LFE JSON library: https://github.com/thorgisl/ljson
— Reply to this email directly or view it on GitHub https://github.com/lfex/lutil/pull/4#issuecomment-60494154.
Huh. Those are some very nice libraries ... just added a ticket to dive into that in more detail: https://github.com/thorgisl/ljson/issues/1
The new function does what it says:
(lutil-type:dict?)
checks to see if the provided data is a dict.Any chance you could merge this soon? (and do a point release) I'm working on an LFE JSON library that needs this functionality ...