fromJson method

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

Implementation

fromJson(Map<String, dynamic>? json) {
  if (json != null) {
    id = json['id'];
    displayName = json['displayName'];
    dateMade = json['dateMade'];
    dateUpdated = json['dateUpdated'];
    // Object specific fields. As Vasat allows for inline fields we simply check if we have the item field. If we do use it. Otherwise assume all object fields are inline
    fromJsonItem( (json['item'] != null) ? json['item'] : json);
  }
}