Added functionality and test.
Merge pull request #49 from defyrlt/feature/custom_json_encoder

Custom JSON Encoder