spdx / tools-golang

Collection of Go packages to work with SPDX files
Other
130 stars 59 forks source link

feat: prototype 3.0 model #247

Open kzantow opened 4 months ago

kzantow commented 4 months ago

This PR implements one possible data model to support SPDX 3, along with functional JSON serialization / deserialization. There are sure to be some rough edges!

The easiest way to understand what usage looks like is to check out the tests -- they perform some basic document creation, along with serializing, deserializing, and re-serializing to verify the documents are the same.

A few rough edges with SPDX 3 in general seem to be:

This PR does not add anything in the way of data validation, so it is probably pretty easy to create invalid documents. How to handle this is TBD.

This PR also does not add any conversion functionality to/from older versions of SPDX.

Feedback requested!