json-editor
json-editor copied to clipboard
Key names may not contain dot (.)
Key names containing a dot are displayed truncated after the last dot. Culprit is the line
this.key = this.path.split('.')
BTW: This also seems to be an issue at other places when you specify a path as string, for example when adding a watch.
Workaround:
Replace line 1362
this.key = this.path.split('.').pop();
by
if ( options.parent ) this.key = this.path.substring(options.parent.path.length+1);
else this.key = this.path;
+1
Is anyone considering contributing this fix to the repo?
How tested is it? Any side effects?
+1 / Waiting for merge. Other alternative: Check for unescaped dots.