allows for encoder to be objects. Assumes that object always end on $ and classes never do.
adds a test case for objects as custom encoder
Merge pull request #106 from wallnuss/feature-custom-encoder-as-objects

Fixes #104 Objects as custom encoders