json-editor icon indicating copy to clipboard operation
json-editor copied to clipboard

Key names may not contain dot (.)

Open decatur opened this issue 11 years ago • 4 comments

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.

decatur avatar Apr 25 '14 16:04 decatur

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;

decatur avatar Apr 28 '14 14:04 decatur

+1

wong2 avatar Jul 09 '15 03:07 wong2

Is anyone considering contributing this fix to the repo?

How tested is it? Any side effects?

saintsGrad15 avatar Apr 18 '16 14:04 saintsGrad15

+1 / Waiting for merge. Other alternative: Check for unescaped dots.

bmarwell avatar Oct 24 '17 06:10 bmarwell