json

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0, GPL-2.0, CC-BY-4.0 Imports: 10 Imported by: 47

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read added in v0.5.0

func Read(content io.Reader) (*spdx.Document, error)

Read takes an io.Reader and returns a fully-parsed current model SPDX Document or an error if any error is encountered.

func ReadInto added in v0.5.0

func ReadInto(content io.Reader, doc common.AnyDocument) error

ReadInto takes an io.Reader, reads in the SPDX document at the version provided and converts to the doc version

func Write added in v0.5.0

func Write(doc common.AnyDocument, w io.Writer, opts ...WriteOption) error

Write takes an SPDX Document and an io.Writer, and writes the document to the writer in JSON format.

Types

type WriteOption added in v0.5.1

type WriteOption func(*json.Encoder)

func EscapeHTML added in v0.5.1

func EscapeHTML(escape bool) WriteOption

func Indent added in v0.5.1

func Indent(indent string) WriteOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL