I'd rather have JSON.json emit exceptions when trying to serialize unknown datatypes and/or types without a JSON equivalent.
For example _print(io::IO, state::State, f::Function) will silently accept functions and emit an useless JSON string. I'm pretty sure nobody wants to let functions slip through silently.
I'm also looking at d::DataType. Is there any case where this would result in useful behavior?