Simplify as_json casts