jsondiff

package
v0.27.4 Latest Latest
Warning

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

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

Documentation

Overview

Package jsondiff is for diffing JSON data.

It does it by pretty-printing the JSON data (with ordered keys and generous line feeds), and then diffing it line-by-line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diff

func Diff(a map[string]interface{}, b map[string]interface{}) string

Diff returns the line diff of the two JSON map[string]interface{}s.

func DiffStrings

func DiffStrings(a, b string) (string, error)

DiffStrings json.Unmarshals the strings and diffs that.

func Pretty

func Pretty(w io.Writer, data map[string]interface{}, indent string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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