Skip to content

JSON Parser Issue: Incomplete Handling of Special Characters #64

@dexsper

Description

@dexsper

We've encountered a significant issue with the your JSON parser, which mishandles certain unescaped backslashes (\), quotation marks ("), or other control characters correctly. This limitation causes our UI to break entirely, requiring us to apply workarounds, such as adding extra characters. This behavior affects the reliability of our interface, and we'd appreciate an update to improve the parser’s handling of these characters to ensure compatibility and stability.

Example of JSON:

[
    {
        "name": "123",
        "parent": "Overlay",
        "destroyUi": "123",
        "components": [
            {
                "type": "UnityEngine.UI.Image",
                "color": "0 0 0 0"
            },
            {
                "type": "RectTransform",
                "offsetmax": "0 0"
            }
        ]
    },
    {
        "name": "123_1",
        "parent": "123",
        "components": [
            {
                "type": "UnityEngine.UI.Text",
                "text": "ааа\\",
                "fontSize": 20,
                "font": "robotocondensed-regular.ttf",
                "align": "MiddleLeft"
            },
            {
                "type": "RectTransform",
                "anchormin": "0 1",
                "anchormax": "0 1",
                "offsetmin": "-50 -50",
                "offsetmax": "50 50"
            }
        ]
    }
]

Originally posted by @dassjosh in dassjosh/Rust.UIFramework#16 (comment)

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