Skip to content

How to load ASN.1 description in json structure #76

@pedefe

Description

@pedefe

Hello,
Do you have a function (or a link on a library in js) to load an ASN.1 description and convert it in json structure ?
For exemple :

ASN.1 Description :
 
DENM ::= SEQUENCE { 
  header ItsPduHeader, 
  denm DecentralizedEnvironmentalNotificationMessage 
} 
 
DecentralizedEnvironmentalNotificationMessage ::= SEQUENCE { 
  management ManagementContainer, 
  situation SituationContainer OPTIONAL, 
  location LocationContainer OPTIONAL, 
  alacarte AlacarteContainer OPTIONAL 
} 

converted in something like...

{
	DENM: {
		_type: "SEQUENCE",
		_content: {
			header: "ItsPduHeader",
			denm: "DecentralizedEnvironmentalNotificationMessage"
			}
		},
	ItsPduHeader: {
		_type: "SEQUENCE",
		_sequence: {
			protocolVersion: {
				_type: "INTEGER",
				_range: [0,255]
				},
			messageID: {
				_type: "INTEGER",
				_choice: {
					1: "denm",
					2: "cam",
					3: "poi"
					}
				}
			stationID: {
				_type: "StationID"
				}
			},
		DecentralizedEnvironmentalNotificationMessage: {
			...
			}
		},
	...
}

Best regards.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions