mirror of https://github.com/tidwall/gjson.git
update Result.Bool to use golang bool parsing
golang has several tools that already parse boolean values in the standard library. Specifically strconv.ParseBool(string) https://golang.org/pkg/strconv/#ParseBool "ParseBool returns the boolean value represented by the string. It accepts 1, t, T, TRUE, true, True, 0, f, F, FALSE, false, False. Any other value returns an error." This change returns any matching ParseBool string to that boolean value, or if the string is not one of those values, the error being thrown, returns a false.
This commit is contained in:
parent
f042915ca1
commit
7db3b02e3f
Loading…
Reference in New Issue