My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Squashed 'ocaml-yamlt/' changes from 30828b24..f35834da

f35834da Fix quoted empty strings being parsed as null in YAML

git-subtree-dir: ocaml-yamlt
git-subtree-split: f35834da2b17929e30a7251b5efdac693fea5044

+5 -2
+5 -2
lib/yamlt.ml
··· 303 303 check_nodes d; 304 304 let meta = meta_of_span d ev.span in 305 305 let type_err fnd = Jsont.Repr.type_error meta t ~fnd in 306 - (* Determine which decoder to use based on scalar content *) 307 - if is_null_scalar value then 306 + (* Determine which decoder to use based on scalar content. 307 + IMPORTANT: Quoted scalars that look like null (e.g., "" or "null") 308 + should be treated as strings, not null. Only plain scalars 309 + should be resolved as null. *) 310 + if style = `Plain && is_null_scalar value then 308 311 match map.dec_null with 309 312 | Some t' -> decode_scalar_as d ev value style t' 310 313 | None -> type_err Jsont.Sort.Null