[ This file is autogenerated from apexdoc ]
AqSObjectToJSONConverter
Converts Salesforce records to JSON format based on mapping configuration. Handles hierarchical data structures and field name mapping.
Group modules/mapping tool
Overview
AqSObjectToJSONConverter is responsible for converting Salesforce SObjects to JSON format. It:
- Builds hierarchical record trees with parent-child relationships
- Maps Salesforce field names to external field names
- Handles lookup field references
- Converts field values to JSON-compatible formats
- Supports custom data providers for testing
Usage
Typically used through AqMappingToolService, but can be instantiated directly:
AqSObjectToJSONConverter converter = new AqSObjectToJSONConverter();
String json = converter.createJSON(accountIds, 'AccountMapping');
Custom Data Providers
For testing or custom logic, you can provide custom data providers:
AqSObjectToJSONConverter converter = new AqSObjectToJSONConverter(
customObjectDefinitionData,
customFieldDefinitionData
);
See the main module documentation for JSON output structure examples.