We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ffjson generates wrong marshaler for github/google/uuid#UUID type
It implements fmt.Stringer, encoding.BinaryMarshaler and encoding.TextMarshaler.
fmt.Stringer
encoding.BinaryMarshaler
encoding.TextMarshaler
Insead of expected
{"Bar":"0eec3f57-eb61-4833-a78e-fdf6eb8ac4ae"}
I get
{"Bar":[14,236,63,87,235,97,72,51,167,142,253,246,235,138,196,174]}
main.go
package ffjson_uuid import "github.com/google/uuid" //go:generate ffjson main.go type Foo struct { Bar uuid.UUID }
main_ffjson.go
... // MarshalJSONBuf marshal buff to json - template func (j *Foo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { if j == nil { buf.WriteString("null") return nil } var err error var obj []byte _ = obj _ = err buf.WriteString(`{"Bar":`) buf.WriteString(`[`) for i, v := range j.Bar { if i != 0 { buf.WriteString(`,`) } fflib.FormatBits2(buf, uint64(v), 10, false) } buf.WriteString(`]`) buf.WriteByte('}') return nil } ...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
ffjson generates wrong marshaler for github/google/uuid#UUID type
It implements
fmt.Stringer
,encoding.BinaryMarshaler
andencoding.TextMarshaler
.Insead of expected
I get
main.go
main_ffjson.go
The text was updated successfully, but these errors were encountered: