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 (fields != null) {
    _json["fields"] = fields.map((value) => (value).toJson()).toList();
  }
  if (name != null) {
    _json["name"] = name;
  }
  if (oneofs != null) {
    _json["oneofs"] = oneofs;
  }
  if (options != null) {
    _json["options"] = options.map((value) => (value).toJson()).toList();
  }
  if (sourceContext != null) {
    _json["sourceContext"] = (sourceContext).toJson();
  }
  if (syntax != null) {
    _json["syntax"] = syntax;
  }
  return _json;
}