Skip to content

Commit 6caa151

Browse files
authored
Merge pull request #2777 from LaurentGoderre/metadata-list-support
Add ability to output json lists in metadata build file
2 parents 7855f83 + be6d832 commit 6caa151

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

commands/build.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,8 +763,11 @@ func decodeExporterResponse(exporterResponse map[string]string) map[string]inter
763763
}
764764
var raw map[string]interface{}
765765
if err = json.Unmarshal(dt, &raw); err != nil || len(raw) == 0 {
766-
out[k] = v
767-
continue
766+
var rawList []map[string]interface{}
767+
if err = json.Unmarshal(dt, &rawList); err != nil || len(rawList) == 0 {
768+
out[k] = v
769+
continue
770+
}
768771
}
769772
out[k] = json.RawMessage(dt)
770773
}

0 commit comments

Comments
 (0)