toJson method

Map<String, Object> toJson ()

Implementation

core.Map<core.String, core.Object> toJson() {
  final core.Map<core.String, core.Object> _json =
      new core.Map<core.String, core.Object>();
  if (methods != null) {
    _json["methods"] = methods.map((value) => (value).toJson()).toList();
  }
  if (mixins != null) {
    _json["mixins"] = mixins.map((value) => (value).toJson()).toList();
  }
  if (name != null) {
    _json["name"] = name;
  }
  if (options != null) {
    _json["options"] = options.map((value) => (value).toJson()).toList();
  }
  if (sourceContext != null) {
    _json["sourceContext"] = (sourceContext).toJson();
  }
  if (syntax != null) {
    _json["syntax"] = syntax;
  }
  if (version != null) {
    _json["version"] = version;
  }
  return _json;
}