Semantic.fromJson constructor

Semantic.fromJson(
  1. Map json
)

Implementation

factory Semantic.fromJson(Map json) {
  final List<Slot> slots = <Slot>[];
  if (json['slots'] != null) {
    slots.addAll(
      (json['slots'] as List).cast<Map>().map<Slot>(Slot.formJson).toList(),
    );
  }
  return Semantic(intent: json['intent'], slots: slots);
}