type Identifier struct {
Type string `json:"type"`
ID int `json:"id"`
}
type Identifier struct {
Type string `json:"type"`
Name string `json:"name"`
}
type Identifier struct {
Postal Postal `json:"postal"`
Road Road `json:"road"`
}
This PR prefixed known structs with the parent and if that's not enough, appends an integer:
type Identifier struct {
Type string `json:"type"`
ID int `json:"id"`
}
type MunicipalityIdentifier struct {
Type string `json:"type"`
Name string `json:"name"`
}
type BuildingIdentifier struct {
Postal Postal `json:"postal"`
Road Road `json:"road"`
}
The second commit improves (and fixes) the naming of deeper nested duplicate objects. I think it's best to keep the commits separate and not squash them on merge.
Before, the attached example was converted to:
This PR prefixed known structs with the parent and if that's not enough, appends an integer:
The second commit improves (and fixes) the naming of deeper nested duplicate objects. I think it's best to keep the commits separate and not squash them on merge.
The tests also depend on https://github.com/mholt/json-to-go/pull/128
Fixes #78