PatchbayIdentityWire.fromJson constructor

PatchbayIdentityWire.fromJson(
  1. Map<String, Object?> json, {
  2. String path = r'$',
})

Decodes a strict JSON object at path.

Implementation

factory PatchbayIdentityWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{
    'schemaVersion',
    'serverVersion',
    'features',
    'applicationId',
    'appInstanceId',
    'isolateId',
  }, path);
  return PatchbayIdentityWire(
    schemaVersion: _wireInt(json['schemaVersion'], '$path.schemaVersion'),
    serverVersion: _wireString(json['serverVersion'], '$path.serverVersion'),
    features: _wireList(json['features'], '$path.features')
        .map((item) => _wireString(item, '$path.features[]'))
        .toList(growable: false),
    applicationId: _wireString(json['applicationId'], '$path.applicationId'),
    appInstanceId: _wireString(json['appInstanceId'], '$path.appInstanceId'),
    isolateId: json['isolateId'] == null
        ? null
        : _wireString(json['isolateId'], '$path.isolateId'),
  );
}