I am trying to figure out the best way to deal with a REST API that has rather large and numerous codes that are mapped to Enums in Delphi. Unfortunately, Delphi doesn't automatically handle the enums because they are assigned values so no RTTI is generated. For Example:
TReportTypeCode = (reportTypeCodeSTR=102, reportTypeCodeLCTR=106, reportTypeCodeCDR=113, reportTypeCodeLVCTR=14, reportTypeCodeEFTR=145);
I have enabled Scoped_Enums to prevent confusion between the many similarly named enums and eliminate the convention of using a neumonic prefix. Since the object graph is deep, with many such enum values I would like to find a way to serialize/deserialize the root object without using TJSONWriter/Reader and coding the entire de/serialization.
Is it possible to use Interceptors with the native Delphi JSON libraries?
Are there any other third party (preferably open source) libraries that can handle such enums?