-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Environment:OS: MacOS 14.4 (23E214)
node.js / npm versions: NA
Additional info:
-
3
-
Developer Tools
Problem Statement/Rationale
When creating a new index with a Partial Filter Expression from the Compass GUI, if you click "format", the resulting JSON will not be valid because it removes quotes around single word fields.
Please be sure to attach relevant logs with any sensitive data redacted.
Please see attached screen capture.
Steps to Reproduce
- Click Create -> Index to open the "Create Index" modal in Compass
- Expand options then check "Partial Filter Expression"
- Paste in some valid JSON like `{ "foo": "bar" }`
- Click the Format button in the top right of the text area
- Notice the double quotes around `"foo"` are removed resulting in invalid JSON: `{ foo: "bar" }`
- Click "Create Index" and note the failure toast.
Expected Results
The Format button formats as valid JSON within fields that require it.
Actual Results
The Format button formats to a JS object, not valid JSON, even if the content was previously valid JSON.
Additional Notes
I love using Compass! Thanks for all the hard work!