jackycchen opened a new issue #1767:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/1767
## Feature Request
### Is your feature request related to a problem?
Code location: YamlEngine.java#marshal
`public static String marshal(final Object value) {
return new Yaml(new ElasticJobYamlRepresenter()).dumpAsMap(value);
}`
The function dumpAsMap detail is :
`public String dumpAsMap(Object data) {
return this.dumpAs(data, Tag.MAP, FlowStyle.BLOCK);
}`
Problem is **data format incompatible**
When the third parameter is FlowStyle.BLOCKļ¼the result of function dumpAsMap
is yaml format string
When set third parameter to null, the the result of function dumpAsMap is
json format string
I found that elasticjob client store the config of a task in zookeeper is
json format string in the older version(**like 2.1.5**), this will lead to
incompatible with the current version.
### Describe the feature you would like.
**should modify the function dumpAsMap like this:**
`public String dumpAsMap(Object data) {
return this.dumpAs(data, Tag.MAP, null);
}`
I think the data format should not be incompatible, thus will cause
difficult to upgrade.
----------------------------------------------------------------
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]