BSON for Jackson
The bson4jackson library integrates completely into Jackson. Please have a look at the Jackson wiki for a complete description. For more information you may also have a look at the bson4jackson tutorial.
The BSON specification defines some additional types not available in the original JSON specification. These types are mapped to simple wrapper objects.
bson4jackson binaries are available from the GitHub Download page.
You may also use Maven to download bson4jackson:
<dependencies> <dependency> <groupId>de.undercouch</groupId> <artifactId>bson4jackson</artifactId> <version>2.0.0</version> </dependency> </dependencies>
If you're using sbt, you may add the following line to your project:
val bson4jackson = "de.undercouch" % "bson4jackson" % "2.0.0"
For buildr use the following snippet:
bson4jackson 2.x is compatible to Jackson 2.0 and higher.
If you're looking for a version compatible to Jackson 1.x, please use bson4jackson 1.3.0. It's the last version for the 1.x branch. bson4jackson 1.3.0 is compatible to Jackson 1.7 up to 1.9.
bson4jackson is licensed under the Apache License, Version 2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
You need buildr in order to compile the bson4jackson library. Please follow the instructions on the buildr website.
Execute the following command to compile the library and to run the unit tests:
buildr compile test
If everything runs successfully, you may create a .jar library:
buildr clean package
The library will be located under the
buildr includes a task that creates the files required to develop bson4jackson in Eclipse. Run the following command:
Then import the project into your workspace. If Eclipse complains about
your classpath, make sure the variable
M2_REPO is set to your local
Maven repository. You can change that variable under
"Window/Preferences/Java/Build Path/Classpath Variables".