Skip to content

Commit

Permalink
Fix marshalling of false value in KeycloakBoolQuoted (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
vlaurin authored Mar 12, 2021
1 parent 2df0fac commit 6068244
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions keycloak/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ type KeycloakBoolQuoted bool

func (c KeycloakBoolQuoted) MarshalJSON() ([]byte, error) {
var buf bytes.Buffer
if c == false {
buf.WriteString(`""`)
} else {
buf.WriteString(strconv.Quote(strconv.FormatBool(bool(c))))
}
buf.WriteString(strconv.Quote(strconv.FormatBool(bool(c))))
return buf.Bytes(), nil
}

Expand Down

0 comments on commit 6068244

Please sign in to comment.