View Issue Details

IDProjectCategoryView StatusLast Update
000672010000-006: MappingsSpecpublic2023-05-16 16:54
ReporterMartin Regen Assigned ToRandy Armstrong  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Fixed in Version1.05.03 RC1 
Summary0006720: Simplified JSON encoding as a text string for BuiltIn types ExpandedNodeId and QualifiedName
Description

The proposal is to allow the content of NodeId, ExpandedNodeId and QualifiedName
to be encoded in a single parseable string representation in addition and fully interchangeable to the currently specified existing full JSON object.

For applications where e.g.

  • configurations are saved as JSON and may be modified by human users or
  • when JSON is sent to the cloud for further processing
    it would be beneficial to have the option for such simplified JSON encoding.

Currently the QualifiedName or ExpandedNodeId are encoded in the following way:

"QualifiedName":
{
"Name": "Attribute",
"Uri": "http://www.opcfoundation.org/DemoServer/"
}

Proposed simplified encoding:
"QualifiedName" : "http://www.opcfoundation.org/DemoServer/:AlarmIdentifier" or
"QualifiedName" : "http://www.opcfoundation.org/DemoServer/#AlarmIdentifier" or
"QualifiedName" : "http://www.opcfoundation.org/DemoServer/;AlarmIdentifier"

or ExpandedNodeId:

"ExpandedNodeId": {
"IdType": 1,
"Id": "AlarmIdentifier",
"Namespace": "http://www.opcfoundation.org/DemoServer/"
}

similar to the encoding of the xml:
svr=<serverindex>;ns=<namespaceindex>;<type>=<value>
or
svr=<serverindex>;nsu=<uri>;<type>=<value>

Proposed simplified encoding:
"ExpandedNodeId":“nsu=http://www.opcfoundation.org/DemoServer/;s=AlarmIdentifier” or
"ExpandedNodeId":“ns=1;s=AlarmIdentifier”

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

has duplicate 0007742 closedRandy Armstrong Requirement for escaping characters in NodeId string identifier 
has duplicate 0008458 closedRandy Armstrong Standard Usage of NodeId in non-OPC UA applications such as Databases - Portable NodeId 

Activities

Martin Regen

2021-04-13 07:12

developer   ~0014188

Note from Randy: the original JSON encoding specified what you suggested. It was change because of the need to ‘translate indexes’ when serialized values have their namespace table changed meant that every NodeId/QN string needed to be parsed. It was felt that simply substituting a numeric value for the NamespaceIndex was less work for generic JSON processors.

That said, I am working on a JSON NodeSet syntax that will introduce a more optimized NodeId/QN encoding.

Martin Regen

2021-04-13 15:28

developer   ~0014204

add sample for problem to solve:

OpcEvents": [
{
"Id": "nsu=http://OPCFoundation.org/Interfaces/;s=179&quot;,
"DisplayName": "SimpleEvents",
"SelectClauses": [
{ "TypeDefinitionId": "i=2782", "AttributeId": 1 },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "EventId" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "ConditionName" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "SourceName" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "Message" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "Retain" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "ActiveState" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "Severity" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "Time" ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "http://OPCFoundation.org/Interfaces/#AlarmIdentifier&quot; ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "http://OPCFoundation.org/Interfaces/#AuxParameters&quot; ] },
{ "TypeDefinitionId": "i=2041", "BrowsePath": [ "EventType" ] }
],
"WhereClause": {
"Elements": [
{
"FilterOperator": "OfType",
"FilterOperands": [ { "Value": "nsu=http://OPCFoundation.org/Interfaces/;i=1006&quot; } ]
}
]
}
}

image.png (142,744 bytes)   
image.png (142,744 bytes)   

Martin Regen

2021-04-13 15:44

developer   ~0014205

It was agreed that there is demand for a string format, but not only to cover this case but also look at it from the viewpoint of Nodeset JSON.

The idea is to mandate the existing JSON encoding for point to point communication but allow for the string representation when JSON is persisted or when JSON is sent in non reversible form.

Randy will write up a proposal for a string format that can be universally used.

Randy Armstrong

2022-12-23 10:25

administrator   ~0018338

Defined a normative string representation for NodeId, ExpandedNodeId and QualifiedName in 5.1.10.

Randy Armstrong

2023-05-03 08:35

administrator   ~0019269

Reviewed by Martin. Solution addresses the need.

Jim Luth

2023-05-16 16:54

administrator   ~0019390

Agreed to changes in Web meeting.

Issue History

Date Modified Username Field Change
2021-03-31 08:32 Martin Regen New Issue
2021-03-31 08:32 Martin Regen Status new => assigned
2021-03-31 08:32 Martin Regen Assigned To => Randy Armstrong
2021-03-31 08:34 Martin Regen Description Updated
2021-04-13 07:12 Martin Regen Note Added: 0014188
2021-04-13 15:28 Martin Regen Note Added: 0014204
2021-04-13 15:28 Martin Regen File Added: image.png
2021-04-13 15:44 Martin Regen Note Added: 0014205
2022-12-23 10:25 Randy Armstrong Status assigned => resolved
2022-12-23 10:25 Randy Armstrong Resolution open => fixed
2022-12-23 10:25 Randy Armstrong Note Added: 0018338
2022-12-27 11:44 Randy Armstrong Relationship added has duplicate 0007742
2022-12-28 06:43 Randy Armstrong Fixed in Version => 1.05.03 RC1
2022-12-28 06:48 Randy Armstrong Relationship added has duplicate 0008458
2023-03-23 21:26 Randy Armstrong Status resolved => assigned
2023-05-03 08:35 Randy Armstrong Status assigned => resolved
2023-05-03 08:35 Randy Armstrong Note Added: 0019269
2023-05-16 16:54 Jim Luth Status resolved => closed
2023-05-16 16:54 Jim Luth Note Added: 0019390