Skip to content

Need to escape ASCII control characters #51

@raphlinus

Description

@raphlinus

Serializing control characters such as "\x01" results in these characters being passed through, ie "\"\x01\"" rather than the correct "\"\\u0001\"". The JSON spec is quite clear that these characters must be escaped, and at least one JSON implementation (Swift's) rejects the unescaped variant as invalid JSON.

I'm happy to provide a patch, not sure if you prefer that or to write your own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions