10000 GitHub - orasik/gocomparejson: Compare two json strings in golang and return true if they match
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

orasik/gocomparejson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card Build Status codecov

ComapreJSON

Compare two json strings in go lang

Installation

go get github.com/orasik/gocomparejson

Usage

Example

package main

import (
	"fmt"
	jsonutil "github.com/orasik/gocomparejson"
)

func main() {
	json1 := []byte(`{"hello":"world"}`)
	json2 := []byte(`{
"hello":"world"
}`)

	val, err := jsonutil.CompareJSON(string(json1), string(json2))

	fmt.Print(val)
	fmt.Print(err)
}

Unit test

go test -v

About

Compare two json strings in golang and return true if they match

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0