devtools/util/pretty_json
library
Functions
-
boundedPrettyFormatBody(Object? data, {int budget = 2000, int maxListItems = 50, int maxStringLength = 2000, int maxDecodeLength = 50000})
→ String
-
Like prettyFormatBody, but caps how much it walks and prints, for callers that format right away, like a logger.
-
prettyFormatBody(Object? data)
→ String
-
Formats a request or response body as indented JSON; bytes and
FormData get a short summary, and other text is returned as is.
-
truncateBody(Object? data, int maxLength)
→ Object?
-
Cuts a text body to
maxLength chars before capture; Maps and Lists pass through so formatting is paid only when shown.