ktmud commented on a change in pull request #9474: Enable beautiful json for
dashboard metadata editor
URL:
https://github.com/apache/incubator-superset/pull/9474#discussion_r404494609
##########
File path: superset-frontend/src/dashboard/components/PropertiesModal.jsx
##########
@@ -24,6 +24,7 @@ import Select from 'react-select';
import AceEditor from 'react-ace';
import { t } from '@superset-ui/translation';
import { SupersetClient } from '@superset-ui/connection';
+import stringify from 'json-stringify-pretty-compact';
Review comment:
This generates more compact strings.
E.g.
```json
{
"short array": [1, 2, 3],
"long array": [
{"x": 1, "y": 2},
{"x": 2, "y": 1},
{"x": 1, "y": 1},
{"x": 2, "y": 2}
]
}
```
vs
```json
{
"bool": true,
"short array": [
1,
2,
3
],
"long array": [
{
"x": 1,
"y": 2
},
{
"x": 2,
"y": 1
},
{
"x": 1,
"y": 1
},
{
"x": 2,
"y": 2
}
]
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]