-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Due to the numbering scheme that json2object employs, it would seem that redundant source files are being generated. For example, for a JsonParser that parses an object such as MyObject, it is possible (after enough builds) for the macro to generate JsonParser_0 and JsonParser_2 that both perform the exact same role. This means, after enough compilations, we can have as many as hundreds of redundant parsers. While performing a complete rebuild circumvents this, it is not ideal and could also lead to source code conflicts if we choose to only rebuild.
My suggestion would be to name the parsers not by integer, but by the type they operate on (i.e. JsonParser_MyObject), while the macro can throw in a quick "if type exists" check using the object name to establish if it needs to recreate the type or not.