Api call 1
{
"thing": "val"
}
Api call 2
{
"something": "val"
}
type Foo struct {
Thing string
}
How would you handle getting "val"
into Thing
for both Api calls? In the one case, it's a deeply nested object, so I really really don't want to write my own unmarshalling.
I could just have 2 fields, Thing and Something, but that'll kinda suck. Not sure what good options there are, tho.
For now I have a field
something
that I set Thing equal to after the json unmarshal.