jsonEncode<T> static method

  1. @useResult
String jsonEncode<T>(
  1. Iterable<T> iterable
)

Returns the JSON-encoded string representation of iterable.

The elements of iterable (type T) must be directly encodable by dart:convert.jsonEncode (e.g., num, String, bool, null, List, or Map with encodable keys and values). Audited: 2026-06-12 11:26 EDT

Implementation

@useResult
static String jsonEncode<T>(Iterable<T> iterable) => dc.jsonEncode(iterable.toList());