-
-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Labels
yamlIssue related to YAML format backendIssue related to YAML format backend
Milestone
Description
Hi,
I am trying to use SequenceWriter
as suggested here to serial objects to multidocs but unsuccessful in doing do. Here is my code :
File directory = new File("src/main/resources/output");
String fileName = "output-multidocs.yaml";
try(SequenceWriter sequenceWriter = mapper.writer().writeValues(new File(directory, fileName))){
sequenceWriter.init(true);
sequenceWriter.writeAll(detailsList); // detailsList is an arrayList of object.
sequenceWriter.writeAll(detailsList); // Expectation is this would create separate doc in the same yaml file. But it was appending to above list.
}catch (Exception e){
e.printStackTrace();
}
Could you please advice me the way to serialize objects into multidocs in a single yaml file.
Metadata
Metadata
Assignees
Labels
yamlIssue related to YAML format backendIssue related to YAML format backend