Fix #562: allow `$` character in property names of of a JSON schema

This commit is contained in:
jos 2018-08-12 13:06:31 +02:00
parent ae3fb78486
commit 260a428249
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ https://github.com/josdejong/jsoneditor
- Show validation errors inline instead of at the bottom when in code - Show validation errors inline instead of at the bottom when in code
mode. Thanks @meirotstein. mode. Thanks @meirotstein.
- Fix #562: allow `$` character in property names of of a JSON schema.
## 2018-08-10, version 5.20.0 ## 2018-08-10, version 5.20.0

View File

@ -684,7 +684,7 @@ exports.parsePath = function parsePath(jsonPath) {
} }
// find a match like '.prop' // find a match like '.prop'
var match = jsonPath.match(/^\.(\w+)/); var match = jsonPath.match(/^\.([\w$]+)/);
if (match) { if (match) {
prop = match[1]; prop = match[1];
remainder = jsonPath.substr(prop.length + 1); remainder = jsonPath.substr(prop.length + 1);