readNull method

T? readNull(
  1. dynamic value,
  2. TypeInfo type,
  3. JsonSerializerOptions options
)

Converts a null JSON value to type T.

@param value The JSON value (may be null). @param type The type information describing the target type. @param options The serializer options containing configuration. @returns The converted value of type T, or null if the input value is null.

Implementation

T? readNull(dynamic value, TypeInfo type, JsonSerializerOptions options) {
  if (value == null) {
    return null;
  }
  return read(value, type, options);
}