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

String Literals do not parse correctly

Open sunpar opened this issue 7 years ago • 1 comments

  1. What version of RJEA are you using (react-json-editor-ajrm version)? 2.5.8
  2. What operating system and processor architecture are you using? MAC OSX
  3. What did you do? Developer
  4. What did you expect to see? String literal to parse correctly in the editor
  5. What did you see instead? doesn't parse correctly, getting an error when rendering

Reproduce steps:

  1. Using the create-react-app example
  2. Modify one of the sample data properties to the following (I did it for the userID of the first person): 'Sum({< DateNum = {">=$(vGlobalStartDate)<=$(vGlobalEndDate)"},FrequencyNumber = {1}>} [Firm TNA])'
  3. Note that it renders as not a string at first
  4. Touch (dirty) the editor, and observe that it now errors out.

sunpar avatar Oct 26 '18 22:10 sunpar

Hello @sunpar

thank you very much for reporting this. I can reproduce this issue on my end.

A workaround for now would be to also escape double quotes inside of strings: Sum({< DateNum = {\">=$(vGlobalStartDate)<=$(vGlobalEndDate)\"},FrequencyNumber = {1}>} [Firm TNA])

I'll label this as a bug and will close this issue once its fixed.

SachsKaylee avatar Oct 30 '18 15:10 SachsKaylee