MCPcopy Create free account
hub / github.com/conforma/cli / toJSON

Method toJSON

cmd/validate/vsa.go:1244–1251  ·  view source on GitHub ↗

toJSON converts ComponentResultsDisplay to JSON format

()

Source from the content-addressed store, hash-verified

1242
1243// toJSON converts ComponentResultsDisplay to JSON format
1244func (d ComponentResultsDisplay) toJSON() ([]byte, error) {
1245 report := d.toVSASectionsReport()
1246 data, err := json.MarshalIndent(&report, "", " ")
1247 if err != nil {
1248 return nil, fmt.Errorf("failed to marshal to JSON: %w", err)
1249 }
1250 return data, nil
1251}
1252
1253// toYAML converts ComponentResultsDisplay to YAML format
1254func (d ComponentResultsDisplay) toYAML() ([]byte, error) {

Callers 1

toFormatMethod · 0.95

Calls 2

toVSASectionsReportMethod · 0.95
ErrorfMethod · 0.65

Tested by

no test coverage detected