We’re experiencing a critical issue with our supplier collaboration dashboard where JSON exports are truncating decimal values in pricing data. When exporting supplier quotes and pricing information via the REST API, decimal precision is being lost - values like 125.4567 are coming through as 125.46 or sometimes just 125.0.
We’ve checked our database column definitions which are set to DECIMAL(18,4), but the JSON serialization seems to be applying some default rounding. The API query parameters we’re using are standard:
GET /api/v1/supplier/pricing?format=json&precision=full
This is causing significant problems for our financial reconciliation processes since supplier pricing often includes fractional cents that matter for high-volume orders. Has anyone encountered similar decimal field mapping issues with the Reporting API in IS 2022.2?
This sounds like a content-type header issue combined with serialization configuration. When the API returns JSON, it needs explicit instructions for decimal handling. I’d recommend checking two things: first, verify your database column type definitions are correctly mapped in the data model layer, and second, look at the REST API response headers to see what content-type and charset are being returned. Sometimes the serializer defaults to a lower precision when the content-type isn’t explicitly set to application/json with proper encoding.
Here’s the comprehensive solution that addresses all the precision issues:
1. Database Column Type Verification
First, confirm your columns are properly defined:
ALTER TABLE supplier_pricing
MODIFY unit_price DECIMAL(18,4);
2. JSON Serialization Configuration
The key issue is Jackson’s default decimal handling. You need to configure the serialization settings in your API configuration file (typically api-config.xml or similar):
<json-serialization>
<decimal-format scale="4" rounding-mode="HALF_UP"/>
</json-serialization>
3. REST API Query Enhancement
The precision parameter needs proper backend support. Verify your API endpoint is configured to accept and process this parameter. In IS 2022.2, you may need to add a custom parameter handler:
@QueryParam("precision")
String precision = "full";
if ("full".equals(precision)) {
objectMapper.enable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN);
}
4. Decimal Field Mapping in Data Layer
Ensure your entity mappings use BigDecimal, not Double:
@Column(precision=18, scale=4)
private BigDecimal unitPrice;
Critical Points:
- The database column definitions (DECIMAL(18,4)) are correct, but they’re only half the solution
- JSON serialization must be explicitly configured to preserve decimal precision - Jackson defaults can truncate
- REST API query parameters need backend implementation to actually affect serialization behavior
- Decimal field mapping throughout the entire stack must use BigDecimal to avoid floating-point precision loss
Implementation Steps:
- Update your API configuration to include the decimal-format settings shown above
- Verify entity mappings use BigDecimal with proper precision/scale annotations
- Add the precision parameter handler to your REST endpoint if not already present
- Test with various decimal values (including edge cases like .9999) to confirm full precision is maintained
- Update your API documentation to reflect the precision parameter usage
After implementing these changes, your supplier pricing exports should maintain full decimal precision through the entire JSON serialization process. The financial reconciliation issues should be resolved once all four layers (database, entity mapping, serialization config, and API parameters) are properly aligned.
I worked on a similar issue last year. The problem is typically in the JSON serialization layer, not the database. Infor SCM uses Jackson for JSON processing, and by default it can truncate decimals based on the serialization context. You need to configure the decimal format explicitly in your API configuration. Check if there’s a JsonSerializerSettings or similar configuration where you can set the decimal scale and rounding mode.
We encountered this in our implementation and the issue was multi-layered. The precision parameter alone won’t fix it. You need to verify the complete data flow from database to API response. Check your entity mappings and make sure decimal fields aren’t being cast to float or double anywhere in the process, as that introduces precision loss before serialization even happens.
Adding to what others mentioned - we had this exact issue with supplier pricing exports. The solution involved both database and API layer changes. Make sure your DECIMAL columns are properly defined, but more importantly, you need to configure the JSON serialization to respect those definitions. Also, double-check that your REST API query parameters are actually being processed - sometimes the precision parameter gets ignored if the API version doesn’t support it.
I’ve seen this before with JSON serialization in Infor SCM. The default JSON serializer sometimes applies its own precision rules regardless of database column types. Check your API endpoint configuration - there’s usually a serialization settings file where you can specify decimal handling. Also, are you using the built-in export or a custom integration?
We’re using the built-in Reporting API export functionality. I checked the API documentation and found a reference to serialization settings, but the precision parameter in our query doesn’t seem to be having any effect. The financial team is really concerned because we’re off by hundreds of dollars on large orders when these fractional cents compound.