Open maxRN opened 1 month ago
Did some more investigating and it seems to be related to white space. Here are two examples that don't work
let does_not_work = {| { "records": [ { "hello": "some str" } ] } |};;
(* ^ the problem *)
let does_not_work2 = {| { "records": [ { "hello": "some str" } , { "hello": "some other str" }] } |};;
(* ^ the problematic whitespace *)
whereas these two strings parse fine:
let this_works = {| { "records": [ { "hello": "some str" }] } |};;
let this_works2 = {| { "records": [ { "hello": "some str" }, { "hello": "some other str" }] } |};;
Note the additional whitespace between } ]
and } ,
in the non-working examples.
Serde fails to parse this JSON object correctly:
with the following type definitions:
error message:
I have created a reproduction repo here: https://github.com/maxrn/serde_list_repro