document property

String document
final

The decoded body, re-encoded — never a re-serialised model.

Neither transport port ever exposes raw wire bytes: both get() and getConditional() hand back an already-decoded Map<String, dynamic>, so there is no original JSON string in this package to store. This is jsonEncode() of that same decoded map, which is what makes it safe: a key PanelSchema.fromJson does not yet recognise is still in that map and survives the round trip. Encoding the model instead would let this package's own types silently become the cache's schema and drop such a key on write, never to be recovered.

Key order or escaping may differ from what the server originally sent, and that is inert: etag is never recomputed or compared against these bytes — it is an opaque token, stored beside the document and echoed back in If-None-Match.

Implementation

final String document;