test(Id,Name,Description,IdFile,FileName,FileDescription,FileSize,FileType):-
yaml_write(current_output,[thing{id:Id,name:Name, description:Description,data_distributions:[thing2{id:IdFile,name:FileName}]},thing{id:Id,name:Name, description:Description,data_distributions:[thing2{id:IdFile,name:FileName}]}],[]).
%%% ediprolog
%%%?- test(1,name,description,idFile,fileName,fileDescription,fileSize,fileType).
%@ - data_distributions:
%@ - id: idFile
%@ name: fileName
%@ description: description
%@ id: 1
%@ name: name
%@ - data_distributions:
%@ - id: idFile
%@ name: fileName
%@ description: description
%@ id: 1
%@ name: name
%@ true.
I expected:
%@ - id:1
%@ name: name
%@ description: description
%@ data_distributions:
%@ - id: idFile
%@ name: fileName
%@ - id:1
%@ name: name
%@ description: description
%@ data_distributions:
%@ - id: idFile
%@ name: fileName
%@ true.
My system expects the id to be the first item, then I do not think the order matters. Is there a way to get the yaml write to do this?