diff options
author | Justin Chadwell <me@jedevc.com> | 2022-12-05 12:14:01 +0000 |
---|---|---|
committer | Justin Chadwell <me@jedevc.com> | 2022-12-05 12:14:01 +0000 |
commit | 452903873695a5a58db4e61e41ffa5c5463f2334 (patch) | |
tree | 5d799e6dc4cfa2979026079e399d9ec0e923c626 | |
parent | fe9bc5fc34d357646142914e0538fd4c3bafa298 (diff) | |
download | spdx-tools-452903873695a5a58db4e61e41ffa5c5463f2334.tar.gz |
json: hide deprecated and non-spec fields
Some non-spec defined fields and deprecated fields were being
incorrectly exported as part of the v2_1 and v2_2 module, so they were
out-of-sync with v2_3.
Signed-off-by: Justin Chadwell <me@jedevc.com>
-rw-r--r-- | spdx/v2_1/document.go | 2 | ||||
-rw-r--r-- | spdx/v2_2/document.go | 2 | ||||
-rw-r--r-- | spdx/v2_2/package.go | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/spdx/v2_1/document.go b/spdx/v2_1/document.go index 9721463..21533a0 100644 --- a/spdx/v2_1/document.go +++ b/spdx/v2_1/document.go @@ -61,5 +61,5 @@ type Document struct { Snippets []Snippet `json:"snippets"` // DEPRECATED in version 2.0 of spec - Reviews []*Review + Reviews []*Review `json:"-"` } diff --git a/spdx/v2_2/document.go b/spdx/v2_2/document.go index d4d4e50..b09e88f 100644 --- a/spdx/v2_2/document.go +++ b/spdx/v2_2/document.go @@ -61,5 +61,5 @@ type Document struct { Snippets []Snippet `json:"snippets"` // DEPRECATED in version 2.0 of spec - Reviews []*Review + Reviews []*Review `json:"-"` } diff --git a/spdx/v2_2/package.go b/spdx/v2_2/package.go index 53dd3a2..164dfd2 100644 --- a/spdx/v2_2/package.go +++ b/spdx/v2_2/package.go @@ -9,7 +9,7 @@ type Package struct { // NOT PART OF SPEC // flag: does this "package" contain files that were in fact "unpackaged", // e.g. included directly in the Document without being in a Package? - IsUnpackaged bool + IsUnpackaged bool `json:"-"` // 7.1: Package Name // Cardinality: mandatory, one @@ -45,7 +45,7 @@ type Package struct { // Cardinality: optional, one; default value is "true" if omitted FilesAnalyzed bool `json:"filesAnalyzed,omitempty"` // NOT PART OF SPEC: did FilesAnalyzed tag appear? - IsFilesAnalyzedTagPresent bool + IsFilesAnalyzedTagPresent bool `json:"-"` // 7.9: Package Verification Code PackageVerificationCode common.PackageVerificationCode `json:"packageVerificationCode"` |