JSON library for clojure 1.3

659 views
Skip to first unread message

Islon Scherer

unread,
Jul 22, 2011, 5:05:20 PM7/22/11
to clo...@googlegroups.com
Is there a clojure json library that works in clojure 1.3?
I tried danlarkin/clojure-json but it gives me error: java.lang.IllegalArgumentException: Unable to resolve classname: IPersistentMap, compiling:(org/danlarkin/json/encoder.clj:144)

Wilson MacGyver

unread,
Jul 22, 2011, 5:15:17 PM7/22/11
to clo...@googlegroups.com
I'm still using https://github.com/mmcgrana/clj-json with 1.2, it's
worth a try though, since
it's just a wrapper for jackson.

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

--
Omnem crede diem tibi diluxisse supremum.

Sean Corfield

unread,
Jul 22, 2011, 5:20:47 PM7/22/11
to clo...@googlegroups.com
On Fri, Jul 22, 2011 at 2:05 PM, Islon Scherer <islons...@gmail.com> wrote:
> Is there a clojure json library that works in clojure 1.3?

How about: [org.clojure/data.json "0.1.1"] (formerly clojure.contrib.json)?
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

Islon Scherer

unread,
Jul 22, 2011, 5:31:33 PM7/22/11
to clo...@googlegroups.com
Thanks Sean, org.clojure/data.json worked like a charm.

Lee Hinman

unread,
Jul 22, 2011, 5:46:32 PM7/22/11
to Clojure
Check out Cheshire also: http://github.com/dakrone/cheshire

It's based off of clj-json, but more up to date.

- Lee

Islon Scherer

unread,
Jul 22, 2011, 9:45:07 PM7/22/11
to clo...@googlegroups.com
I'll take a look, but I only need basic json encoding/decoding right now.

Islon

Stuart Sierra

unread,
Aug 1, 2011, 8:57:54 AM8/1/11
to clo...@googlegroups.com
clojure.contrib.json has been continued as clojure.data.json:
https://github.com/clojure/data.json

It should work in 1.3

-Stuart Sierra
clojure.com

Arthur Edelstein

unread,
Aug 1, 2011, 4:37:01 PM8/1/11
to Clojure
Similar question: where is clojure.contrib.string for 1.3? There are a
lot of useful functions in clojure.contrib.string that aren't in
clojure.string 1.3.

Thanks! :)

Arthur

OGINO Masanori

unread,
Aug 1, 2011, 6:49:20 PM8/1/11
to clo...@googlegroups.com
> Similar question: where is clojure.contrib.string for 1.3?
+1

http://dev.clojure.org/display/design/Contrib+Library+Names
c.c.string is not included in this list.
Is there any plans to go to modular contrib (string.incubator,
tools.string, etc.)?

--
Name: OGINO Masanori (荻野 雅紀)
E-mail: masanor...@gmail.com

Vincent

unread,
Aug 1, 2011, 10:34:36 PM8/1/11
to clo...@googlegroups.com
how can i test using clooj ide... will lein deps, then run clooj allow me test in repl window 

Arthur Edelstein

unread,
Aug 2, 2011, 1:51:27 AM8/2/11
to Clojure
On Aug 1, 7:34 pm, Vincent <vincent....@gmail.com> wrote:
> how can i test using clooj ide... will lein deps, then run clooj allow me
> test in repl window

Yes, please give it a try. Any jar in the lib directory (as typically
deposited by lein or cake) should be available on the classpath. After
calling lein deps, you will need to choose the Restart REPL menu item
in clooj if it is already running.

Arthur

Vincent

unread,
Aug 2, 2011, 10:21:26 AM8/2/11
to clo...@googlegroups.com
yes ..it is working / great
Thanks a lot
Vincent

Chas Emerick

unread,
Aug 2, 2011, 4:09:07 PM8/2/11
to clo...@googlegroups.com

On Aug 1, 2011, at 6:49 PM, OGINO Masanori wrote:

>> Similar question: where is clojure.contrib.string for 1.3?
> +1
>
> http://dev.clojure.org/display/design/Contrib+Library+Names
> c.c.string is not included in this list.
> Is there any plans to go to modular contrib (string.incubator,
> tools.string, etc.)?

FWIW, many functions from c.c.string were migrated to the core clojure.string namespace starting in Clojure v1.2.0:

http://clojure.github.com/clojure/clojure.string-api.html

- Chas

OGINO Masanori

unread,
Aug 2, 2011, 10:16:47 PM8/2/11
to clo...@googlegroups.com
> FWIW, many functions from c.c.string were migrated to the core clojure.string namespace starting in Clojure v1.2.0
Indeed but others aren't there yet.

Will the rest be migrated in clojure.string until 1.3 release date?
If not, probably we need modular c.c.string for performance-sensitive
codes, or less (apply str ...string manipulation...) without getting
rid of seq abstraction.

Thanks.

Stuart Sierra

unread,
Aug 5, 2011, 9:36:07 PM8/5/11
to clo...@googlegroups.com
Are there any features you found essential in clojure.contrib.str-utils{2|3} that are not included in clojure.string? Please let me know, and we can consider tickets for those specific functions.

-Stuart Sierra
clojure.com

Arthur Edelstein

unread,
Aug 6, 2011, 2:05:43 PM8/6/11
to Clojure
From clojure.contrib.string 1.2, I have found myself using drop, take,
and butlast. (These are more than just wrappers for String/substring,
because they behave nicely when indices exceed the string length.) I
like these methods in part because they match the behavior of
corresponding sequence methods, but have better performance. This
makes optimizing (when needed) easier.

Thanks,
Arthur

Stuart Sierra

unread,
Aug 7, 2011, 10:19:29 AM8/7/11
to clo...@googlegroups.com
Hi Arthur,

I think thos would make a reasonable addition. If you'll make a JIRA ticket in the backlog, I'll see if I can push it forward. Ultimately, it will be Rich's decision, of course.

Thanks,
-Stuart Sierra
clojure.com

Aaron Bedra

unread,
Aug 7, 2011, 3:17:33 PM8/7/11
to clo...@googlegroups.com
Perhaps we can put these in core.incubator for now so they have a place
to live in the 1.3 world. The function for this library is the staging
of things that are destined for core itself, so it might not be a bad idea.

Cheers,

Aaron Bedra
--
Clojure/core
http://clojure.com

Sean Corfield

unread,
Aug 7, 2011, 9:11:22 PM8/7/11
to clo...@googlegroups.com
Wouldn't string.incubator be better, for possible inclusion in clojure.string (rather than core.incubator for clojure.core). Seems more consistent... Otherwise things will be moving from c.contrib.foo to c.core.incubator and then (possibly) to c.foo...

Arthur Edelstein

unread,
Aug 8, 2011, 1:59:01 PM8/8/11
to Clojure
Hi Stuart,

I've added a JIRA ticket (CLJ-826).

Thanks,
Arthur

Stuart Sierra

unread,
Aug 8, 2011, 3:13:11 PM8/8/11
to clo...@googlegroups.com
Thanks, Arthur. I've placed it in "Backlog" because it's a feature enhancement.

Regards,
-Stuart
Reply all
Reply to author
Forward
0 new messages