yaml-diff-patch icon indicating copy to clipboard operation
yaml-diff-patch copied to clipboard

JSON path ~ escape conversion

Open turtle11311 opened this issue 10 months ago • 0 comments

When a YAML key contains a '/', the JSON patch specification uses the escaped string '~1' to represent this character. However, while traversing the YAML tree, YAML compares keys using string equality. Therefore, we need to unescape the JSON path (i.e., convert '~1' back to '/') before retrieving the corresponding YAML item.

turtle11311 avatar Mar 16 '25 04:03 turtle11311