bytedance / go-tagexpr

An interesting go struct tag expression syntax for field validation, etc.
Apache License 2.0
1.66k stars 142 forks source link

Supporting different JSON tag #39

Open odinmarks1988 opened 2 years ago

odinmarks1988 commented 2 years ago

Hi

Is it possible to support custom JSON tag for binding data? As sometime for the same data, we will want to support snake case and camel case for the same field.

Example:

type Person struct {
    DateOfBirth string `json:"dateOfBirth" sjson:"date_of_birth"`
}