deserialize method

  1. @override
void deserialize(
  1. Map<String, dynamic>? json
)
override

Implementation

@override
void deserialize(Map<String, dynamic>? json) {
  if (json == null) {
    throw ApiException(400, 'Failed to deserialize ListFormat data model.');
  }

  super.deserialize(json);
  if (json.containsKey('Link')) {
    link = ModelBase.createInstance<WordsApiLink>(
        json['Link'] as Map<String, dynamic>);
  } else {
    link = null;
  }

  if (json.containsKey('ListLevelNumber')) {
    listLevelNumber = json['ListLevelNumber'] as int;
  } else {
    listLevelNumber = null;
  }

  if (json.containsKey('ListId')) {
    listId = json['ListId'] as int;
  } else {
    listId = null;
  }

  if (json.containsKey('IsListItem')) {
    isListItem = json['IsListItem'] as bool;
  } else {
    isListItem = null;
  }
}