Skip to content

Serde failing to parse string with additional whitespace #37

@maxRN

Description

@maxRN

Serde fails to parse this JSON object correctly:

{ "x": [ { "name": "max" } ] }

with the following type definitions:

type a = { name : string } [@@deriving deserialize, serialize,]
type t = { x : a list } [@@deriving deserialize, serialize,]

error message:

Fatal error: exception Yojson__Common.Json_error("Line 6, bytes 5-12:\nExpected ',' but found '\n  ]\n}\n'")

I have created a reproduction repo here: https://github.com/maxrn/serde_list_repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions