···303303 check_nodes d;
304304 let meta = meta_of_span d ev.span in
305305 let type_err fnd = Jsont.Repr.type_error meta t ~fnd in
306306- (* Determine which decoder to use based on scalar content *)
307307- if is_null_scalar value then
306306+ (* Determine which decoder to use based on scalar content.
307307+ IMPORTANT: Quoted scalars that look like null (e.g., "" or "null")
308308+ should be treated as strings, not null. Only plain scalars
309309+ should be resolved as null. *)
310310+ if style = `Plain && is_null_scalar value then
308311 match map.dec_null with
309312 | Some t' -> decode_scalar_as d ev value style t'
310313 | None -> type_err Jsont.Sort.Null