-
Notifications
You must be signed in to change notification settings - Fork 7
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
SWE Common JSON Encoding in Connected systems RFC #71
Comments
If it is essential to maintain the current encoding for a DataRecord with key/value pairs, would it be possible to provide an additional encoding with pure arrays? In place of the following encoding: Enable a simpler encoding, e.g. Maybe create a jsonEncoding type to describe which option used, similar to the already existing textEncoding. Alternatively have the DataRecord indicate that it is utilizing compact encoding via a dedicated attribute. |
@KathiSchleidt @joanma747 We had such alternative encoding at some point in the early draft. We'll discuss adding this back in during our next telecon. I also think it's useful. |
Some ideas for the encoding rules:
|
@alexrobin I worry a bit about your cascade of subtleties guiding the encoding, would feel safer if we could just indicate the encoding utilized through an encodingType attribute. You already support textEncoding, why not introduce a jsonEncoding to clarify? |
Discussed during 10/17 telecon. Ok to add this feature in the JSON encoding. The idea would be to add a flag on the JSONEncoding object to turn the encoding of DataRecord as JSON arrays on or off. |
@KathiSchleidt Yes, we decided to simplify the approach. We already have a |
How would we call this property? I though about |
Discussed during 12/12 telecon. We agreed to use two separate flags: one for records called The goal is to support the common case where only vectors would be encoded as JSON arrays, while the surrounding records stays encoded as JSON object. For example: {
"time": "2024-05-16T14:32:47Z",
"location": [-86.147852, 38.47159],
"speed": 450,
"heading": 126.5
} |
The basic example for the DataRecord on page 91 includes the values of the fields within the fields, not really useful
The example for a DataRecord inside a DataArray on page 96 does have a separate values block for the entire DataArray separate from the fields, and the encoding here is for an array of objects with key/value pairs, with the keys being the names of the fields in the DataRecord. The fields are ordered, as described as an array, so this could have a far more compact encoding (just arrays)
Going to the example of a TextEncoding on page 73 of a DataStream containing DataRecords, the encoding is efficient, not using key/value pairs (but is not an array, just a long text string that you have to parse yourself using the information from the TextEncoding.
The example on page 100 does not provide actual data encoding, does provide an interestingly nested set of fields (3 on the base level, 2 of which are vectors themselves), no idea how they propose to flatten this
The text was updated successfully, but these errors were encountered: