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.
Due to the numbering scheme that json2object employs, it would seem that redundant source files are being generated. For example, for a
JsonParserthat parses an object such asMyObject, it is possible (after enough builds) for the macro to generateJsonParser_0andJsonParser_2that 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.