// MarshalJSON implements the encoding/json Marshaler interface. It will encode
// i into its JSON representation if valid, or 'null' otherwise.
MarshalJSON implements the encoding/json Marshaler interface. It will encode
i into its JSON representation if valid, or 'null' otherwise.
// MarshalJSON implements the encoding / json Marshaler interface . It will encode // i into its JSON representation if valid or ' null ' otherwise .
func (i Uint8) MarshalJSON() ([]byte, error) {
	if !i.Valid {
		return []byte("null"), nil
	}
	return []byte(strconv.FormatUint(uint64(i.Uint8), 10)), nil
}
func ( i Uint8 ) MarshalJSON ( ) ( [ ] byte , error ) { if ! i . Valid { return [ ] byte ( " " ) , nil } return [ ] byte ( strconv . FormatUint ( uint64 ( i . Uint8 ) , 10 ) ) , nil }
MarshalJSON implements the encoding/json Marshaler interface.
MarshalJSON implements the encoding / json Marshaler interface .