yaml-diff-patch
yaml-diff-patch copied to clipboard
JSON path ~ escape conversion
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.