Allow JSON encoding at the DataLayer level.

JSON encoding is now handled at the DataLayer level allowing for specialized,
granular, data-aware encoding. Also, since the JSON encoder is now a class
attribute, extensions can replace the pre-defined data layer encoder with their
own implementation. Closes #102.