toJson method
dynamic
toJson()
Implementation
JsonDocument toJson() => <String, dynamic>{
if (maxAge != null) SystemMetadata.MaxAge: maxAge!.inSeconds,
if (maxCount != null) SystemMetadata.MaxCount: maxCount,
if (cacheControl != null)
SystemMetadata.CacheControl: cacheControl!.inSeconds,
if (truncateBefore != null)
SystemMetadata.TruncateBefore:
// Must be parsed as unsigned to match charp ulong
// range 0 to 18,446,744,073,709,551,615, where upper
// bound codifies end, which signed equals to -1
truncateBefore!.value.toStringUnsigned(),
if (custom != null) ...custom,
if (acl != null) SystemMetadata.Acl: acl!.toJson(),
};