toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      if (requiredValue != null) "required": encodeValue(requiredValue),
      if (defaultValue != null) "default": encodeValue(defaultValue),
      if (about != null) "about": encodeValue(about),
      if (items != null) "items": encodeValue(items),
      "name": encodeValue(name),
      "type": encodeValue(type),
    };