fromJson static method

ItemsChoice? fromJson(
  1. Map<String, dynamic>? json
)

Returns a new ItemsChoice instance and imports its values from json if it's non-null, null if json is null.

Implementation

static ItemsChoice? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return ItemsChoice(
    default_: json[r'default'],
    description: json[r'description'],
    enum_: json[r'enum'] == null ? null : List<String>.from(json[r'enum']),
    format: json[r'format'],
    id: json[r'id'],
    maxItems: json[r'maxItems'],
    minItems: json[r'minItems'],
    oneOf: ItemsChoice.listFromJson(json[r'oneOf']),
    propertyOrder: json[r'propertyOrder'],
    title: json[r'title'],
    type: json[r'type'],
  );
}