Converts this class object into a JSON value.
@override Map<String, dynamic> toJson() { final result = super.toJson(); if (identity != null) { result["identity"] = identity; } return result; }