TextJsonX extension

Adds JSON decoding helpers to String.

Used internally by conversion methods to automatically parse JSON strings when working with collection types. For example, '[1,2,3]' passed to Convert.toList is decoded before element conversion.

on

Methods

decode() → dynamic

Available on String, provided by the TextJsonX extension

Decodes this string as JSON, throwing FormatException if parsing fails.
tryDecode() Object?

Available on String, provided by the TextJsonX extension

Attempts to decode this string as JSON, returning the original string on failure.