From 35fd1fa3eeb9def69d00470192873297f8c845bc Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 5 Feb 2022 02:31:39 -0500 Subject: cpedict: add json field names to struct tags for title and reference --- cpedict/cpedict.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cpedict') 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. -- cgit v1.2.3