Skip to content

Json-validator does only one thing: verify that the JSON string is valid

Notifications You must be signed in to change notification settings

Lighfer/json-validator

Repository files navigation

Usage:

validator has only one function: Validate, it returns nil if JSON string is valid, otherwise reutrns the ErrJSON.

func TestValidate_epub(t *testing.T) {
	f, err := os.Open("epub.json")
	if err != nil {
		t.Fatal(err)
	}

	b, _ := ioutil.ReadAll(f)

	if err = Validate(string(b)); err != nil {
		t.Fatal(err)
	}
}

About

Json-validator does only one thing: verify that the JSON string is valid

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages