Open
Description
I would expect private fields to only be included if I have called extra.SupportPrivateFields()
type s struct {
FieldName string
privateField string
}
s1 := s{FieldName: "foo", privateField:"bar"}
extra.SetNamingStrategy(extra.LowerCaseWithUnderscores)
json1, _ := jsoniter.Marshal(s1)
println(string(json1))
output:
{"field_name":"foo","private_field":"bar"}
Metadata
Metadata
Assignees
Labels
No labels