Skip to content

Detect string end quotes correctly #31

@webmaster128

Description

@webmaster128

Right now in parse_str, each " character is considered a JSON string terminator. This is incorrect because it ends strings even at escaped quotes. E.g.

{
  "title": "hello \"world\""
}

is parsed as title = "hello\" and the rest is considered broken data.

String end detection can be implemented without unescaping strings (and thus remains zero-copy). If someone is interested to do so, feel free to re-use the implementation from CosmWasm#11.

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