Alex Goodman f699a6add8
update TODO and log entries
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-11-22 14:37:40 -05:00

20 lines
367 B
Go

package syftjson
import (
"encoding/json"
"io"
"github.com/anchore/syft/syft/sbom"
)
func encoder(output io.Writer, s sbom.SBOM, appConfig interface{}) error {
doc := ToFormatModel(s, appConfig)
enc := json.NewEncoder(output)
// prevent > and < from being escaped in the payload
enc.SetEscapeHTML(false)
enc.SetIndent("", " ")
return enc.Encode(&doc)
}