Demo app to demonstrate YamlProcessor issues
mvn clean install
mvn spring-boot:run
This can be modified here sample.yaml
hello: world
arrayAsArray: ['a', 'b']
emptyString: ""
arrayAsString: "[a,b,c]"
emptyArray: []
emptyElementArray: [""]
$ curl http://localhost:8080/get
arrayAsArray[0]:a {valueInstanceOf=class java.lang.String}
arrayAsArray[1]:b {valueInstanceOf=class java.lang.String}
arrayAsString:[a,b,c] {valueInstanceOf=class java.lang.String}
emptyArray: {valueInstanceOf=class java.lang.String}
emptyElementArray[0]: {valueInstanceOf=class java.lang.String}
emptyString: {valueInstanceOf=class java.lang.String}
hello:world {valueInstanceOf=class java.lang.String}
It is clear that the emptyArray element is returned as a single string object unlike other Array objects where indexing for the collection is being done