Closed ms705 closed 7 years ago
Fixed the first drawback -- the code now checks for definition equality before generating a new struct. This has somewhat reduced the number of extra structs.
@ms705 thanks. I'll dig into this and get back to you soon.
@softprops @clux
This is an extended version of #13, which fixes the concern related to the repeated definition of the "Author" struct as different JSON objects. The strategy I applied here is the same as is used for recursive definitions already: when a struct with the same name as an existing definition is encountered, the name is disambiguated by adding the container name as a prefix.
This works well for me and allows all events to exist in events.txt without breaking Push and Ping. However:
It is overeager, because repeated structs are redefined under different names even if their definition is identical (i.e., we may end up with several copies of what is really the same struct).If neither of those is a concern, this fix should comprehensively address #13.