json property

Object? get json

Decodes body as JSON, or returns null for an empty body.

Implementation

Object? get json => body.trim().isEmpty ? null : jsonDecode(body);