moving to_json to role
base classes