Backwards compatible enhancement of JSON serialization.