codahale/dropwizard — pull request #130 by nicktelford (2012-07-04 14:45:26+00:00)
Title: Add Json read/write support to/from ByteBuffers

Sometimes we have a `ByteBuffer` that we need to either read a JSON document from or write a JSON document to.

To ensure that the same Jackson configuration/feature-set is used, we need to add support to `com.yammer.dropwizard.json.Json` for reading from and writing to `ByteBuffers`.

This implementation supports both direct and "heap" (non-direct) `ByteBuffer`s, and should be fairly efficient.

Tests are of course included and should provide complete coverage of the changes.