ContentMap.fromJson constructor

ContentMap.fromJson(
  1. Object? j
)

Implementation

factory ContentMap.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ContentMap(
    values: switch (json['values']) {
      null => {},
      Map<String, Object?> $1 => {
        for (final e in $1.entries)
          decodeString(e.key): ContentMap_Contents.fromJson(e.value),
      },
      _ => throw const FormatException('"values" is not an object'),
    },
  );
}