Skip to content

Reading to JSON3.Object vs Dict behave differently for control characters #306

@DatName

Description

@DatName

String like

str = """{"text": "\n"}"""

is parsed differently when reading to JSON3.Object vs Dict:

obj = JSON3.read(str) # throws `ArgumentError: encountered unescaped control character in json: '\n'`
dict = JSON3.read(str, Dict) # no error

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions