May 2018
Beginner to intermediate
290 pages
6h 43m
English
So far we have limited ourselves to the built-in libraries that come packaged with Java. But Clojure’s interop features work just as well with third-party libraries. For example, you might be interested in using Google’s take on reading and writing JSON, the Gson library.[29]
To get a feel for using Gson from Clojure, you might start by creating a new project:
| | $ lein new exploregson |
| | |
| | Generating a project called `exploregson`... |
| | |
| | $ cd exploregson |
Next we need to tell Leiningen that our project depends on a particular version of the Gson library. So we add the Gson library and its latest version (at least it’s the latest version as I write this) to the project.clj dependencies. The syntax is exactly the same for Java libraries ...
Read now
Unlock full access