Closed LaurentGoderre closed 5 months ago
Minimal reproducer
package main import ( "bytes" "fmt" spdx_json "github.com/spdx/tools-golang/json" "github.com/spdx/tools-golang/spdx" "github.com/spdx/tools-golang/spdx/v2/common" "github.com/spdx/tools-golang/spdx/v2/v2_3" ) func main() { w := bytes.NewBuffer(nil) o := common.Originator{ OriginatorType: "type", } p := v2_3.Package{ PackageOriginator: &o, } s := spdx.Document{ Packages: []*v2_3.Package{ &p, }, } err := spdx_json.Write(s, w) if err != nil { fmt.Printf("%s", err) } fmt.Printf("%s", w.Bytes()) }
Output:
json: error calling MarshalJSON for type *common.Originator: unexpected end of JSON input
Minimal reproducer
Output: