toJson method
Implementation
Map<String, dynamic> toJson({bool includeValues = false}) {
return {
'path': path,
'kind': kind.name,
'hasRawValue': hasRawValue,
'hasNormalizedValue': hasNormalizedValue,
'rawText': rawText,
'normalizedText': normalizedText,
if (includeValues && hasRawValue) 'rawValue': JsonValue.clone(rawValue),
if (includeValues && hasNormalizedValue)
'normalizedValue': JsonValue.clone(normalizedValue),
};
}