More robust detection of BridgeTypeName annotation when generating JSON