decode method

RecordBatch decode(
  1. String source
)

Implementation

RecordBatch decode(String source) {
  if (source.length > maxSourceLength) {
    throw const FormatException('Batch JSON exceeds the source-size limit');
  }
  final value = jsonDecode(source);
  if (value is! Map) {
    throw const FormatException('Batch must be a JSON object');
  }
  return fromJson(value.cast<String, Object?>());
}