Skip to content

Specially crafted JSON can cause incorrect results with the "\s" node #26

@ChristopherEdwards

Description

@ChristopherEdwards

This test isn't valid JSON (and gives no errors as such) and based on validators it is working correctly. Just a placeholder incase this comes up in the future.

Test Case:

YDB>r JSON
{"name": {"\\s": "ok"}, "name": 42}
YDB>d DECODE^%webjson("JSON","OUT","ERR") ZWR OUT
OUT("name")=42
OUT("name","\s")="ok"

YDB>d ENCODE^%webjson("OUT","ENCODE","ERR") W ENCODE(1)
{"name":"42"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions