This updates encoder errors to report the actual Erlang value that caused the error. This should make it easier to debug errors when generating JSON.