package main import ( "encoding/json" "fmt" ) func main() { goodJSON := `{"example": 1}` badJSON := `{"example":2:]}}` fmt.Println(json.Valid([]byte(goodJSON))) // true fmt.Println(json.Valid([]byte(badJSON))) // false }
CC-BY-SA 3.0 · Powered by MediaWiki
개인정보처리방침 · ABOUT