// MarshalJSON implements the encoding/json Marshaler interface. It will encode
// b into its JSON representation if valid, or 'null' otherwise.
MarshalJSON implements the encoding/json Marshaler interface. It will encode
b into its JSON representation if valid, or 'null' otherwise.
// MarshalJSON implements the encoding / json Marshaler interface . It will encode // b into its JSON representation if valid or ' null ' otherwise .
func (b Bool) MarshalJSON() ([]byte, error) {
	if !b.Valid {
		return []byte("null"), nil
	}
	if !b.Bool {
		return []byte("false"), nil
	}
	return []byte("true"), nil
}
func ( b Bool ) MarshalJSON ( ) ( [ ] byte , error ) { if ! b . Valid { return [ ] byte ( " " ) , nil } if ! b . Bool { return [ ] byte ( " " ) , nil } return [ ] byte ( " " ) , nil }
MarshalJSON implements the encoding/json Marshaler interface.
MarshalJSON implements the encoding / json Marshaler interface .