aboutsummaryrefslogtreecommitdiff
path: root/spdx/v2_2
diff options
context:
space:
mode:
Diffstat (limited to 'spdx/v2_2')
-rw-r--r--spdx/v2_2/document.go12
-rw-r--r--spdx/v2_2/package.go6
2 files changed, 9 insertions, 9 deletions
diff --git a/spdx/v2_2/document.go b/spdx/v2_2/document.go
index b09e88f..31ac08b 100644
--- a/spdx/v2_2/document.go
+++ b/spdx/v2_2/document.go
@@ -53,12 +53,12 @@ type Document struct {
DocumentComment string `json:"comment,omitempty"`
CreationInfo *CreationInfo `json:"creationInfo"`
- Packages []*Package `json:"packages"`
- Files []*File `json:"files"`
- OtherLicenses []*OtherLicense `json:"hasExtractedLicensingInfos"`
- Relationships []*Relationship `json:"relationships"`
- Annotations []*Annotation `json:"annotations"`
- Snippets []Snippet `json:"snippets"`
+ Packages []*Package `json:"packages,omitempty"`
+ Files []*File `json:"files,omitempty"`
+ OtherLicenses []*OtherLicense `json:"hasExtractedLicensingInfos,omitempty"`
+ Relationships []*Relationship `json:"relationships,omitempty"`
+ Annotations []*Annotation `json:"annotations,omitempty"`
+ Snippets []Snippet `json:"snippets,omitempty"`
// DEPRECATED in version 2.0 of spec
Reviews []*Review `json:"-"`
diff --git a/spdx/v2_2/package.go b/spdx/v2_2/package.go
index 164dfd2..77d9c08 100644
--- a/spdx/v2_2/package.go
+++ b/spdx/v2_2/package.go
@@ -52,7 +52,7 @@ type Package struct {
// 7.10: Package Checksum: may have keys for SHA1, SHA256 and/or MD5
// Cardinality: optional, one or many
- PackageChecksums []common.Checksum `json:"checksums"`
+ PackageChecksums []common.Checksum `json:"checksums,omitempty"`
// 7.11: Package Home Page
// Cardinality: optional, one
@@ -108,9 +108,9 @@ type Package struct {
PackageAttributionTexts []string `json:"attributionTexts,omitempty"`
// Files contained in this Package
- Files []*File
+ Files []*File `json:"files,omitempty"`
- Annotations []Annotation `json:"annotations"`
+ Annotations []Annotation `json:"annotations,omitempty"`
}
// PackageExternalReference is an External Reference to additional info