Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant data type descriptors on data stream data points #449

Open
Whathecode opened this issue Oct 30, 2023 · 0 comments
Open

Redundant data type descriptors on data stream data points #449

Whathecode opened this issue Oct 30, 2023 · 0 comments
Labels
enhancement Nice to have, non-functional requirements.

Comments

@Whathecode
Copy link
Member

The polymorphic type descriptor added to data when it is used as part of data streams is redundant.

It duplicates the data stream data type](https://github.com/cph-cachet/carp.core-kotlin/blob/develop/carp.data.core/src/commonTest/resources/test-requests/DataStreamService/1.1/DataStreamServiceTest/appendToDataStreams_succeeds.json#L42):

            "batch": [
                {
                    "dataStream": {
                        "studyDeploymentId": "3de35fb5-c39e-4fea-8ccc-3a70ca618ce7",
                        "deviceRoleName": "Device",
                        "dataType": "dk.cachet.carp.stubpoint"         // DEFINES TYPE
                    },
                    "firstSequenceId": 0,
                    "measurements": [
                        {
                            "sensorStartTime": 0,
                            "data": {
                                "__type": "dk.cachet.carp.stubpoint",       // REDUNDANT; ALWAYS THE SAME
                                "data": "Stub"
                            }
                        }
                     ]
                  }
               ]

A custom serializer could potentially omit all the __type information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Nice to have, non-functional requirements.
Projects
None yet
Development

No branches or pull requests

1 participant