encodeJson function

String encodeJson(
  1. Object? value,
  2. String param
)

jsonEncode for a caller-supplied value the binding serializes itself (prompts, call options, ProviderConfig) — pre-validated with the same rule checkJson applies to caller-supplied JSON text, because nothing downstream would check it.

Implementation

String encodeJson(Object? value, String param) {
  checkPortable(value, param);
  return jsonEncode(value);
}