Categorygithub.com/elgris/jsondiff
modulepackage
0.0.0-20160530203242-765b5c24c302
Repository: https://github.com/elgris/jsondiff.git
Documentation: pkg.go.dev

# README

JSONDIFF

A simple little tool that produces readable diff of 2 JSON-able (read "convertible to map[string]interface{}") objects. Useful for diagnostics or debugging

Installation

go get github.com/elgris/jsondiff

Examples of the output

screen shot 2016-05-20 at 13 03 06

Limitation

  • Coloured output tested with bash only, not sure how it will behave with other terminals.
  • The tool converts input data into map[string]interface{} with json encoding/decoding. Hence, types of input map will change during unmarshal step: integers become float64 and so on (check https://golang.org/pkg/encoding/json/ for details).

License

MIT

# Functions

Compare produces list of diff items that define difference between objects "a" and "b".
Format produces formatted output for a diff that can be printed.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Diff is a result of comparison operation.
DiffItem defines a difference between 2 items with resolution type.

# Type aliases

ResolutionType defines a type of comparison: equality, non-equality, new sub-diff and so on.