aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2022-02-05 02:31:39 -0500
committerPaul Duncan <pabs@pablotron.org>2022-02-05 02:31:39 -0500
commit35fd1fa3eeb9def69d00470192873297f8c845bc (patch)
tree738ec504257340a6f9d55dbda80ebca10bb06057
parent2c10f51c09f56c19dfd1306340102963476bd03e (diff)
downloadcvez-35fd1fa3eeb9def69d00470192873297f8c845bc.tar.bz2
cvez-35fd1fa3eeb9def69d00470192873297f8c845bc.zip
cpedict: add json field names to struct tags for title and reference
-rw-r--r--cpedict/cpedict.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpedict/cpedict.go b/cpedict/cpedict.go
index 0b5f77b..29f9d91 100644
--- a/cpedict/cpedict.go
+++ b/cpedict/cpedict.go
@@ -16,14 +16,14 @@ type Generator struct {
// Dictionary item title.
type Title struct {
- Lang string `xml:"lang,attr"` // language code
- Text string `xml:",chardata"` // value
+ Lang string `xml:"lang,attr" json:"lang"` // language code
+ Text string `xml:",chardata" json:"text"` // value
}
// Dictionary item reference.
type Reference struct {
- Href string `xml:"href,attr"` // Link
- Text string `xml:",chardata"` // Text
+ Href string `xml:"href,attr" json:"href"` // Link
+ Text string `xml:",chardata" json:"text"` // Text
}
// CPE 2.3 item attributes.