I'm not sure about the bit on the encoder knowing how to encode symbols and dates. In fact, if you look at the original encoder, it didn't know how to encode dates or times; the `as_json` representations of symbols and dates originally are a `String`. If you look at `Symbol#as_json`, the result is not `self`, it's actually `to_s`, a `String`; the same with `Date`, `Time` and `DateTime`. So if the encoder thinks the `as_json` representation of a `DateTime` is a `String`, I think this should be enforced everywhere, which is what I am trying to do. :)

If you look at https://github.com/sergiocampama/rails/blob/master/activesupport/lib/active_support/json/encoding.rb , only the JSON primitives (Array, Hash, String, Numeric, TrueClass, FalseClass, NilClass) have an `#encode_json` method, so I think that `as_json` should enforce returning those kind of objects.