toJson method

Map<String, dynamic> toJson({
  1. bool includeValues = false,
})

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),
  };
}