jackson-dataformats-text
jackson-dataformats-text copied to clipboard
Option to use square brackets for arrays instead of dash
Hi, is there a way to get this:
kibana_hide_apps: ["readonlyrest_kbn", "timelion"]
instead of this:
kibana_hide_apps:
- "readonlyrest_kbn"
- "timelion"
I assume this is for YAML backend. At this point I don't think there is no YAMLFeature
for this, although I think SnakeYAML (which is underlying decoder/encoder) should be able to do that -- it is difference between "inline" vs "block" notation I think.
It would probably make sense to allow selecting this just for arrays (and perhaps another one for Objects), if adding a new feature.
Another possibility would be to allow somehow passing specifically configured SnakeYAML emitter/parser, as this would expose full range of settings.
If anyone knows configuration within SnakeYAML
, I'd be interested in figuring out how to pass this configuration.
Is this what you are looking for ? FlowStyle.BLOCK, FlowStyle.FLOW, FlowStyle.AUTO
AUTO means that the first will be block style and then flow style.
Thank you @asomov. That helps understanding intent between styles.
Can this be changed during generation, or does the initial setting remain in effect when generation starts?
it remains