toJson method

Object? toJson()

Encodes this CockpitTestTemplateValue as a JSON object.

Implementation

Object? toJson() => switch (kind) {
  CockpitTestTemplateValueKind.literal => value,
  CockpitTestTemplateValueKind.variable => <String, Object?>{
    r'$var': variable,
  },
  CockpitTestTemplateValueKind.stringTemplate => value,
};