jsonrw

package
v0.0.0-...-579b097 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadRecords

func LoadRecords(filePath string) (*models.DiffRecordList, error)

Loads a json file containing a DiffRecordList object

func OutputFileToString

func OutputFileToString(f string, path string) (string, error)

Types

type JSONFileWriter

type JSONFileWriter struct {
	// contains filtered or unexported fields
}

JSONFileWriter writes data to a json file

func NewJSONFileWriter

func NewJSONFileWriter(filePath string) (*JSONFileWriter, error)

func (*JSONFileWriter) AddEntry

func (w *JSONFileWriter) AddEntry(r interface{}) error

Add entries to an open json list

func (*JSONFileWriter) AddField

func (w *JSONFileWriter) AddField(k string, v interface{}) error

Add field to an open json object

func (*JSONFileWriter) Close

func (w *JSONFileWriter) Close() error

func (*JSONFileWriter) CloseList

func (w *JSONFileWriter) CloseList() error

Close a json list

func (*JSONFileWriter) CloseObject

func (w *JSONFileWriter) CloseObject() error

Close a json object

func (*JSONFileWriter) OpenList

func (w *JSONFileWriter) OpenList() error

Open a json list

func (*JSONFileWriter) OpenObject

func (w *JSONFileWriter) OpenObject() error

Open a json object

Jump to

Keyboard shortcuts

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