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 (achievementType != null) {
    _json["achievementType"] = achievementType;
  }
  if (draft != null) {
    _json["draft"] = (draft).toJson();
  }
  if (id != null) {
    _json["id"] = id;
  }
  if (initialState != null) {
    _json["initialState"] = initialState;
  }
  if (kind != null) {
    _json["kind"] = kind;
  }
  if (published != null) {
    _json["published"] = (published).toJson();
  }
  if (stepsToUnlock != null) {
    _json["stepsToUnlock"] = stepsToUnlock;
  }
  if (token != null) {
    _json["token"] = token;
  }
  return _json;
}