View Issue Details

IDProjectCategoryView StatusLast Update
000450510000-014: PubSubSpecpublic2024-01-02 17:07
ReporterZbynek Zahradnik Assigned ToMatthias Damm  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionreopened 
Summary0004505: Unclear encoding of integer PublisherId-s in JSON NetworkMessage
Description

In Table 91 – JSON NetworkMessage Definition, PublisherIs defined with type String. No explanation is given as to what to do with PublisherIds that are subtype of UInteger.

One possibility is that they are not allowed in JSON. That would not be good,as it should be possible to write PubSub convertors that work between the different mapping, and there won't be a way to convert possible UInteger PublisherId-s from UADP NetworkMessage-s to JSON.

Or perhaps the UInteger PublisherIds should be expressed in a string. In fact, for (Int64 and) UInt64, Part 6 says that (in 5.4.2.3 Integer). But other UInteger types (UInt32, UInt16, Byte) should be JSON numbers according to Part 6, which is in conflict with Table 91.

If we specify that all UInteger PublisherIds should be expressed in JSON string, we should then 1) specify how precisely the string should be formatted, and 2) think about the reversibility and equality (how then distinguish those that represent UInteger from those that are string but just happen to look like an integer).

Also see 0004501.

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

related to 0006308 closedMatthias Damm Clarify how a JSON PubSub message is encoded 

Activities

Zbynek Zahradnik

2019-02-15 11:54

developer   ~0009894

Also in Table 93.

Matthias Damm

2019-03-05 16:37

developer   ~0010010

Added following clarification:
If the PublisherId is a UInteger, the UInteger value is converted to a String using the JSON encoding rules for UInt64.

Changed in
OPC UA Part 14 - PubSub Draft 1.05.07 Specification.docx

Jim Luth

2019-05-21 17:13

administrator   ~0010250

Agreed to changes edited in telecon.

Jouni Aro

2021-09-24 15:36

reporter   ~0015002

There is still a conflict with 0004501, so please review.

Jouni Aro

2021-09-27 11:36

reporter   ~0015019

Details about the conflict:

Table 132 UADP NetworkMessage: PublisherIds are only equal if they have the same DataTypes and equal values
Table 156: JSON NetworkMessage: If the PublisherId is a Uinteger, the Uinteger value is converted to a String without leading zeros

So, there is a contradiction in the sense that in UADP you must distinguish between the different data types, but in JSON you cannot.
Does this really make sense? Can I use the same PublisherId, if I support both encodings in the same Publisher? If not, should it be mentioned clearly?

Issue History

Date Modified Username Field Change
2018-12-08 11:25 Zbynek Zahradnik New Issue
2019-02-15 11:54 Zbynek Zahradnik Note Added: 0009894
2019-02-26 22:42 Matthias Damm Assigned To => Matthias Damm
2019-02-26 22:42 Matthias Damm Status new => assigned
2019-03-05 16:37 Matthias Damm Status assigned => resolved
2019-03-05 16:37 Matthias Damm Resolution open => fixed
2019-03-05 16:37 Matthias Damm Note Added: 0010010
2019-05-21 17:13 Jim Luth Status resolved => closed
2019-05-21 17:13 Jim Luth Fixed in Version => 1.05
2019-05-21 17:13 Jim Luth Note Added: 0010250
2021-09-24 15:36 Jouni Aro Status closed => feedback
2021-09-24 15:36 Jouni Aro Resolution fixed => reopened
2021-09-24 15:36 Jouni Aro Note Added: 0015002
2021-09-27 11:36 Jouni Aro Note Added: 0015019
2022-03-10 18:46 Matthias Damm Relationship added related to 0006308
2024-01-02 17:07 Jim Luth Status feedback => assigned