Unification of absent values serialization in JSON. #2074
Labels
feature
New feature
priority: undecided
Undecided priority to be assigned after discussion
under discussion
Requires consideration before a decision is made whether/how to implement
Background
In Enceladus API V2 (and further on in V3), there are multiple serialization techniques used to get JSON representation of objects, and currently, they behave differently in terms of absent fields serialization (
None
represented asnull
, truenull
s).The first approach is the
ObjectMapper
used by native object mapping (Datasets, Schemas, MTs, PropDefs, ...), defined in rest_api.Application. This unfortunately lacks the.setSerializationInclusion(Include.NON_ABSENT)
option to omit the empty fields during serialization.The second approach used leverages
atum.utils.SerializationUtils.asJson
(e.g. used for Runs) that is configured to omit absent fields.This dichotomy results in a differently looking JSON representation within a single REST API service.
The catch here is that direct unification would directly affect the current V2 serialization that is used - this may or may not be an issue, which is to be determined.
This became clear during #1692.
Feature
Unifiy the serialization approach if possible.
Example [Optional]
vs
Proposed Solution [Optional]
Solution Ideas:
.setSerializationInclusion(Include.NON_ABSENT)
and reflect in testcases and test the UI @ API v2The text was updated successfully, but these errors were encountered: