Allow customizable JSONENcoder

Would be really handy to not have to subclass the serializer to change the encoder.