Data processes / 06
Transform JSON and XML into a reliable target model.
The data is technically readable but still rejected. Field names, types or structures do not match the target application. We develop traceable mappings that also handle empty values, edge cases and changes to the source format.
The starting point
Syntactically valid does not necessarily mean correct for the business.
An XML interface provides products with attributes and namespaces. The target expects JSON objects, unambiguous strings and an array containing all variants. A single XML element must not produce a different target type from multiple elements.
We define the source contract, target contract and transformation rules separately. Required values, nulls and empty strings receive a business meaning; numbers and timestamps are not altered by indiscriminate text conversion.
What DataSource delivers
Field paths, types and validation.
Model
Identify fields, attributes, lists and references. Process XML namespaces by URI rather than relying solely on freely chosen prefixes.
Transform
Implement mapping, type conversion and normalization as versioned rules. Explicitly preserve decimal precision, IDs and time zones.
Validate
Validate the source format and target contract. Business rules supplement JSON Schema or XML Schema; report invalid cases with meaningful field paths.
Technical scenario / Illustrative example
An XML product becomes an explicitly typed object.
Illustrative example with a namespace and string ID. The prefix p is interchangeable; the namespace URI determines the mapping. The price deliberately remains a decimal string here.
Example data and proposed rules. The actual interfaces and business rules are assessed for your project.
<p:product xmlns:p="urn:example:catalog" id="004218">
<p:price currency="EUR">49.90</p:price>
</p:product>
→ {
"sku": "004218",
"price": "49.90",
"currency": "EUR"
}
Error handling, security and operations
Handle schema discrepancies visibly.
Parser security
Disable uncontrolled external XML entities and external resources. Limit size, depth and element counts; imported data is not trusted executable code.
Version changes
Document the mapping version and source schema together. Test new required fields with representative data and roll them out in a controlled way.
Error context
Identify the affected record and field path. Use sensitive payloads only through explicitly approved, protected diagnostic channels.
Technical questions
Details that matter before implementation.
JSON · XML · Namespaces · Data types · Mapping · Schema
Is conversion lossless?
Only with an agreed model. XML supports attributes, namespaces and mixed content; JSON does not automatically represent these equivalently.
Do we always need a schema?
A verifiable contract is important. A formal schema helps, but does not replace rules such as valid product references or permitted state transitions.
What happens to unknown fields?
Depending on the contract, they are ignored, preserved or rejected. This behavior is defined explicitly rather than decided during production operations.
For technical clarification
Start with your actual workflow.
Bring anonymized source examples, the target schema, field definitions and problematic cases. Empty, single-item and multi-item list structures each help with validation.
In our initial discussion, we clarify available access, data ownership and a narrowly scoped first data flow. We then agree on scope, responsibilities and commercial terms.
Anonymized examples are enough to get started. Please do not send passwords, tokens or personal data from production systems in your initial inquiry.
Related challenges
Your next connection in context.
Automate CSV imports
The file arrives every day. Someone corrects columns, uploads it and then checks error messages. DataSource turns this recurring task into a documented import with clear rules for incomplete and invalid data.
REST API integration
Documentation is available and a test request works. Yet everyday operations still produce missing data or duplicate records. DataSource connects your REST API to the actual business process and plans for missing responses as well.
Automate product data workflows
The ERP supplies master data, the PIM supplies text and a supplier provides technical attributes. Manual lists connect this information only temporarily. We create a defined data flow from each authoritative field to a validated channel export.