fromJSON static method

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

Creates an Acquisition from its JSON representation. If the acquisition can't be parsed, a warning will be logged with warnings.

Implementation

static Acquisition? fromJSON(Map<String, dynamic>? json) {
  String? type = json?.optNullableString("type");
  if (type == null) {
    return null;
  }

  return Acquisition(
    type: type,
    children: fromJSONArray(json.optJSONArray("child")),
  );
}