Skip to content

luduoxin/json-validator-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-validator-go

A json validator for golang

Getting started

Prerequisites

Getting json-validator-go

With Go module support, simply add the following import

import "github.com/luduoxin/json-validator-go/validator"

Otherwise, run the following Go command to install the json-validator-go package:

$ go get -u github.com/luduoxin/json-validator-go

using json-validator-go

package main

import (
	"fmt"
	"github.com/luduoxin/json-validator-go/validator"
)

func main() {
	dataStr := `{"foo":"bar"}`
	err := validator.Valid([]byte(dataStr))
	fmt.Println(err)
}

Contributing

We appreciate your help!

About

A json validator for golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages