Converts the related information to a JSON-compatible map.
Map<String, dynamic> toJson() => { 'resource': resource.toString(), ...range.toJson(), 'message': message, };