Enum.fromJson constructor

Enum.fromJson(
  1. Map _json
)

Implementation

Enum.fromJson(core.Map _json) {
  if (_json.containsKey("enumvalue")) {
    enumvalue = (_json["enumvalue"] as core.List)
        .map<EnumValue>((value) => new EnumValue.fromJson(value))
        .toList();
  }
  if (_json.containsKey("name")) {
    name = _json["name"];
  }
  if (_json.containsKey("options")) {
    options = (_json["options"] as core.List)
        .map<Option>((value) => new Option.fromJson(value))
        .toList();
  }
  if (_json.containsKey("sourceContext")) {
    sourceContext = new SourceContext.fromJson(_json["sourceContext"]);
  }
  if (_json.containsKey("syntax")) {
    syntax = _json["syntax"];
  }
}