Skip to content

invalid encoding in json_string_builder-inl.h #2424

@Asmod4n

Description

@Asmod4n

Describe the bug
Hi there, in json_string_builder-inl.h:157 the array is not using the correct json escape mapping, its being escaped as \\x00XX instead of \\u00XX which is invalid, it's also not doing upper case conversions.

parsing a document produced by builder::string_builder with dom::parser when the documents contains escaped characters isn't possible.

The control char \b is also not escaped as \\b but as \\x0008

To Reproduce
There are no test in the codebase to check the behavior of escaping.

simjson release
Commit 8fff575

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