toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'type': type,
if (value != null) 'value': value,
if (objectId != null) 'objectId': objectId,
if (weakLocalObjectReference != null)
'weakLocalObjectReference': weakLocalObjectReference,
};
}