Fix embedded struct marshalling
Fixes struct marshalling for embedded structs when a json tag is specified.
Currently the following case works, and produces the same result as json.Marshal
type EmbeddedParent struct {
*EmbeddedChild
}
However this case does not work as expected
type EmbeddedParent struct {
*EmbeddedChild `json:"embedded"`
}
In the second case the outputted json is flattened, instead of nested as expected.
coverage: 89.212% (+0.05%) from 89.167% when pulling 5579d0b614a5271922b64bab347ba956345a8bce on alecsammon:fix_embedded into e127e90d6237c4c4928b986f66ab89815400a9a9 on liip:master.
coverage: 89.212% (+0.05%) from 89.167% when pulling 80f0f5c7f04dc87a6f12d439f8386e3726562642 on alecsammon:fix_embedded into dc3eac4ae2046ea77888370afa3b3ff5b3fbe9f7 on liip:master.
❤️ - thank you
sorry, got off my radar and just came across this because of another PR coming in :)
no problem at all - we've been using our own fork for the moment - but can now switch back to use this.