fromJson static method

AgentSpec fromJson(
  1. Map<String, dynamic> json
)

Implementation

static AgentSpec fromJson(Map<String, dynamic> json) {
  return AgentSpec(
    name: json["name"],
    description: json["description"],
    annotations: json['annotations'] != null ? {for (final entry in (json['annotations'] as Map).entries) entry.key: entry.value} : {},
    channels: json['channels'] != null ? ChannelsSpec.fromJson(json['channels'] as Map<String, dynamic>) : null,
  );
}