PatchbayBlobMetadataWire.fromJson constructor
Decodes a strict JSON object at path.
Implementation
factory PatchbayBlobMetadataWire.fromJson(
Map<String, Object?> json, {
String path = r'$',
}) {
_wireKeys(json, const <String>{
'blobId',
'source',
'kind',
'contentType',
'length',
'sha256',
'createdAt',
'expiresAt',
'filename',
'properties',
}, path);
return PatchbayBlobMetadataWire(
blobId: _wireString(json['blobId'], '$path.blobId'),
source: PatchbayFactSourceWire.fromJson(
json['source'],
path: '$path.source',
),
kind: PatchbayBlobSourceWire.fromJson(json['kind'], path: '$path.kind'),
contentType: _wireString(json['contentType'], '$path.contentType'),
length: _wireInt(json['length'], '$path.length'),
sha256: _wireString(json['sha256'], '$path.sha256'),
createdAt: _wireString(json['createdAt'], '$path.createdAt'),
expiresAt: _wireString(json['expiresAt'], '$path.expiresAt'),
filename: json['filename'] == null
? null
: _wireString(json['filename'], '$path.filename'),
properties: json['properties'] == null
? const <String, Object?>{}
: _wireJsonObject(json['properties'], '$path.properties'),
);
}