dakrone/cheshire — Issue #13: In 2.0.4 the custom encoding fails to correctly encode on hash-map
Author: wthidden
Created: 2012-01-11 17:25:47+00:00
State: open

While trying to use the custom encoder on this hash-map:
{:resources {:robot (reader trough-1)}, :notes {}, :duration 0.35, :name "robot-move", :procedures ["script3228" "script3220"], :promise "a-promise", :ident "T-105"}

The custom encoder produces this result:
"{\"resources\":{\"robot\":[\"/\",\"/\"]},\"notes\":{},\"duration\":0.35,\"name\":\"robot-move\",\"procedures\":[\"script3228\",\"script3220\"],\"promise\":\"a-promise\",\"ident\":\"T-105\"}"

While the non-custom encoder produces this result:
"{\"resources\":{\"robot\":[\"reader\",\"trough-1\"]},\"notes\":{},\"duration\":0.35,\"name\":\"robot-move\",\"procedures\":[\"script3228\",\"script3220\"],\"promise\":\"a-promise\",\"ident\":\"T-105\"}"

Note that the :robot value for the custom encoder is :[\"/\",\"/\"] but it should be :[\"reader\",\"trough-1\"]
The primary reason for using a custom encoder is that the value "a-promise" is a promise object and a custom encoder is necessary so that encoding can be done at all.

No custom encoders have been added when the call to the custom/encoder was invoked.