Added JSON projections to encoder to allow for custom JSON
serialization.