toJson method
Implementation
Map<String, dynamic> toJson() => {
'name': name,
if (description != null) 'description': description,
'obscure': obscure,
'optional': optional,
'type': type,
if (enumValues != null) 'enum': enumValues,
if (annotations != null) 'annotations': annotations,
};