diff options
author | specter25 <ujjwalcoding012@gmail.com> | 2021-06-14 21:42:48 +0530 |
---|---|---|
committer | specter25 <ujjwalcoding012@gmail.com> | 2021-06-14 21:42:48 +0530 |
commit | ff6167d7d4254bd5c0e443984a3a444a1bebaeae (patch) | |
tree | e0b33bd3d7d53a198de7189951be52acb832392d /examples | |
parent | 8a86c1f72d8c1181841b3e4ee66c424862dba357 (diff) | |
download | spdx-tools-ff6167d7d4254bd5c0e443984a3a444a1bebaeae.tar.gz |
Format comments in JSON to tvsaver example
Signed-off-by: specter25 <ujjwalcoding012@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/8-jsonpasrser2v2/examplejsontotv.go | 10 | ||||
-rw-r--r-- | examples/README.md | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/examples/8-jsonpasrser2v2/examplejsontotv.go b/examples/8-jsonpasrser2v2/examplejsontotv.go index 271826c..7bd8e0e 100644 --- a/examples/8-jsonpasrser2v2/examplejsontotv.go +++ b/examples/8-jsonpasrser2v2/examplejsontotv.go @@ -1,9 +1,9 @@ // SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later -// Example for: *tvloader*, *tvsaver* +// Example for: *jsonparser2v2*, *tvsaver* -// This example demonstrates loading an SPDX tag-value file from disk into memory, -// and re-saving it to a different file on disk. +// This example demonstrates loading an SPDX json from disk into memory, +// and then re-saving it to a different file on disk in tag-value format . package main @@ -29,12 +29,12 @@ func main() { } // open the SPDX file - jsonData, err := ioutil.ReadFile(args[1]) // b has type []byte + jsonData, err := ioutil.ReadFile(args[1]) // jsondata has type []byte if err != nil { log.Fatal(err) } - // try to load the SPDX file's contents as a tag-value file, version 2.2 + // try to load the SPDX file's contents as a json file, version 2.2 doc, err := jsonloader2v2.Load2_2(jsonData) if err != nil { fmt.Printf("Error while parsing %v: %v", args[1], err) diff --git a/examples/README.md b/examples/README.md index fc9c5f9..ecc23d0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -66,7 +66,7 @@ and then printing the corresponding spdx struct for the document . ## 8-jsonparser2v2 -*rdfloader*, +*jsonparser2v2*, *tvsaver* This example demonstrates loading an SPDX json from disk into memory, and then re-saving it to a different file on disk in tag-value format .
\ No newline at end of file |