json static method

String? Function(String?) json({
  1. String errorMessage = 'Please enter valid JSON',
})

Ensures the string is valid JSON.

Implementation

static String? Function(String?) json({
  String errorMessage = 'Please enter valid JSON',
}) {
  return _build(errorMessage, (v) => v.isJson);
}