couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <>
Subject RE: Which Java library to choose?
Date Thu, 22 Apr 2010 18:46:24 GMT
I have never used a dedicated Java library to access CouchDB since it's all simply REST, but
there's two that I know of: couch4j [0] and jcouchdb [1]. Neither look like they've been updated
for CouchDB 0.11 yet.

I actually wrote some code today to access CouchDB from a Java CMS backend, parse the JSON
result into a Map using Jackson's simple data binding [2] and provide that structure to a
template for rendering. That's sounds like a lot of work in Java, but it was actually pretty
easy and I didn't feel I needed a full on CouchDB library. The gist of it was:

ObjectMapper mapper = new ObjectMapper();
URL url = new URL("");
Map<String, Object> doc = mapper.readValue(url.openStream(), Map.class);

But yeah, sure, I understand if you need some more abstraction (although Jackson's full data
binding might also help here). There's tons of JSON libraries for Java (json-lib, Jettison,
Svenson, Jackson, Gson, etc.) and I officially like Jackson best since today. For a little
higher level abstraction I'd try something like Spring's RestTemplate or other REST-oriented
tools. Or yeah, try a dedicated CouchDB library.

Happy hacking!

Nils Breunese.

Van: Meenakshi Sundaram RM []
Verzonden: donderdag 22 april 2010 19:21
Onderwerp: Which Java library to choose?


I came across many Java libraries for accessing CouchDB from a java
application. But I am confused which one to choose. Is there any
community recommend one?

I want to use a library which has the following:
* Actively developed
* Stable
* Easy to use
* Allows most of the functionality supported by CouchDB

Any suggestions/pointers is highly appreciated.

Thanks in advance.

- Sundar

De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend bedoeld voor gebruik
door de geadresseerde en kan vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is voorbehouden aan geadresseerde.
De VPRO staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden
e-mail, noch voor tijdige ontvangst daarvan.

View raw message