View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007750 | 10000-006: Mappings | Spec | public | 2022-02-20 23:24 | 2023-01-03 16:45 |
| Reporter | jpfr | Assigned To | Randy Armstrong | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | won't fix | ||
| Fixed in Version | 1.05.03 RC1 | ||||
| Summary | 0007750: JSON null arrays (length -1) not defined | ||||
| Description | In an automated roundtrip test of binary -> JSON -> binary we stumbled across the following. An empty array has either a defined length of 0 or it can be a "null array" of length -1. The current spec for the JSON mapping doesn't say how to make the distinction between the two types of empty array. By consequence, a variant with a "null" body would contain a -1 array of the given type. Then comes the next can of worms: String, ByteString and XmlElement can all have length -1 as well. However this is resolved, a complete bidirectional mapping between binary and JSON should be possible. | ||||
| Tags | No tags attached. | ||||
| Commit Version | |||||
| Fix Due Date | |||||
|
|
While the original report outlines the issue, here's a solution proposal that is backwards compatible with the current spec: In general:
With that, all options are covered for the Variant: |
|
|
The premise that the distinction between -1 and 0 length matters is wrong. See 5.1.9 Null, Empty and Zero-Length Arrays A null array has no value. A zero-length or empty array is an array with 0 elements. Some DataEncodings will allow the distinction to be preserved on the wire, however, not all DevelopmentPlatforms will be able to preserve the distinction. For this reason, null, empty and zero length arrays are semantically the same for all DataEncodings. |
|
|
Agreed to no-fix in telecon. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2022-02-20 23:24 | jpfr | New Issue | |
| 2022-02-25 17:21 | jpfr | Note Added: 0016111 | |
| 2022-03-01 17:51 | Jim Luth | Assigned To | => Randy Armstrong |
| 2022-03-01 17:51 | Jim Luth | Status | new => assigned |
| 2022-12-28 01:40 | Randy Armstrong | Status | assigned => resolved |
| 2022-12-28 01:40 | Randy Armstrong | Resolution | open => won't fix |
| 2022-12-28 01:40 | Randy Armstrong | Note Added: 0018353 | |
| 2022-12-28 01:41 | Randy Armstrong | Note Edited: 0018353 | |
| 2022-12-28 06:43 | Randy Armstrong | Fixed in Version | => 1.05.03 RC1 |
| 2023-01-03 16:45 | Jim Luth | Status | resolved => closed |
| 2023-01-03 16:45 | Jim Luth | Note Added: 0018390 |