GetJSONName gets the json name for a go property name.
(subject any, name string)
| 99 | |
| 100 | // GetJSONName gets the json name for a go property name. |
| 101 | func (n *NameProvider) GetJSONName(subject any, name string) (string, bool) { |
| 102 | tpe := reflect.Indirect(reflect.ValueOf(subject)).Type() |
| 103 | return n.GetJSONNameForType(tpe, name) |
| 104 | } |
| 105 | |
| 106 | // GetJSONNameForType gets the json name for a go property name on a given type. |
| 107 | func (n *NameProvider) GetJSONNameForType(tpe reflect.Type, name string) (string, bool) { |