From 260a428249536604b2a261d965191686e5cf8d90 Mon Sep 17 00:00:00 2001 From: jos Date: Sun, 12 Aug 2018 13:06:31 +0200 Subject: [PATCH] Fix #562: allow `$` character in property names of of a JSON schema --- HISTORY.md | 1 + src/js/util.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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);