diff --git a/HISTORY.md b/HISTORY.md index abb5ca2..f31eee5 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,6 +7,7 @@ https://github.com/josdejong/jsoneditor - Show validation errors inline instead of at the bottom when in code mode. Thanks @meirotstein. +- Fix #562: allow `$` character in property names of of a JSON schema. ## 2018-08-10, version 5.20.0 diff --git a/src/js/util.js b/src/js/util.js index fdec576..4a42594 100644 --- a/src/js/util.js +++ b/src/js/util.js @@ -684,7 +684,7 @@ exports.parsePath = function parsePath(jsonPath) { } // find a match like '.prop' - var match = jsonPath.match(/^\.(\w+)/); + var match = jsonPath.match(/^\.([\w$]+)/); if (match) { prop = match[1]; remainder = jsonPath.substr(prop.length + 1);