Methods for Testing and Specification (MTS) - The Testing and Test Control Notation version 3 - Part 11: Using JSON with TTCN-3

The present document specifies the rules to define schemas for JSON data structures in TTCN-3, to enable testing of
JSON-based systems, interfaces and protocols, and the conversion rules between TTCN-3 [1] and JSON [2] to enable
exchanging TTCN-3 data in JSON format between different systems.

Metode za preskušanje in specificiranje (MTS) - 3. različica zapisa preskušanja in krmiljenja preskusov - 11. del: Uporaba JSON v TTCN-3

Ta dokument določa pravila za določanje shem za podatkovne strukture JSON v TTCN-3 za omogočanje preskušanja sistemov, vmesnikov in protokolov na osnovi JSON ter pravila za pretvorbo med TTCN-3 [1] in JSON [2] za omogočanje izmenjave podatkov TTCN-3 in formata JSON med različnimi sistemi.

General Information

Status
Published
Publication Date
07-May-2023
Current Stage
6060 - National Implementation/Publication (Adopted Project)
Start Date
08-May-2023
Due Date
13-Jul-2023
Completion Date
08-May-2023
Standard
ETSI ES 201 873-11 V4.10.1 (2023-03) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 11: Using JSON with TTCN-3
English language
36 pages
sale 15% off
Preview
sale 15% off
Preview
Standard
ETSI ES 201 873-11 V4.10.1 (2023-05) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 11: Using JSON with TTCN-3
English language
36 pages
sale 15% off
Preview
sale 15% off
Preview
Standardization document
ES 201 873-11 V4.10.1:2023
English language
36 pages
sale 10% off
Preview
sale 10% off
Preview
e-Library read for
1 day

Standards Content (Sample)


Final draft ETSI ES 201 873-11 V4.10.1 (2023-03)

ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 11: Using JSON with TTCN-3

2 Final draft ETSI ES 201 873-11 V4.10.1 (2023-03)

Reference
RES/MTS-20187311v4.10.1
Keywords
JSON, language, testing, TTCN-3

ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - APE 7112B
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° w061004871

Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the prevailing version of an ETSI
deliverable is the one made publicly available in PDF format at www.etsi.org/deliver.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
If you find a security vulnerability in the present document, please report it through our
Coordinated Vulnerability Disclosure Program:
https://www.etsi.org/standards/coordinated-vulnerability-disclosure
Notice of disclaimer & limitation of liability
The information provided in the present deliverable is directed solely to professionals who have the appropriate degree of
experience to understand and interpret its content in accordance with generally accepted engineering or
other professional standard and applicable regulations.
No recommendation as to products and services or vendors is made or should be implied.
No representation or warranty is made that this deliverable is technically accurate or sufficient or conforms to any law
and/or governmental rule and/or regulation and further, no representation or warranty is made of merchantability or fitness
for any particular purpose or against infringement of intellectual property rights.
In no event shall ETSI be held liable for loss of profits or any other incidental or consequential damages.

Any software contained in this deliverable is provided "AS IS" with no warranties, express or implied, including but not
limited to, the warranties of merchantability, fitness for a particular purpose and non-infringement of intellectual property
rights and ETSI shall not be held liable in any event for any damages whatsoever (including, without limitation, damages
for loss of profits, business interruption, loss of information, or any other pecuniary loss) arising out of or related to the use
of or inability to use the software.
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and
microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© ETSI 2023.
All rights reserved.
ETSI
3 Final draft ETSI ES 201 873-11 V4.10.1 (2023-03)
Contents
Intellectual Property Rights . 5
Foreword . 5
Modal verbs terminology . 5
1 Scope . 6
2 References . 6
2.1 Normative references . 6
2.2 Informative references . 6
3 Definition of terms, symbols and abbreviations . 7
3.1 Terms . 7
3.2 Symbols . 7
3.3 Abbreviations . 7
4 Introduction . 8
5 Conformance and compatibility . 8
6 Using TTCN-3 as JSON Schema . 9
6.1 Approach . 9
6.2 Validation of JSON Values . 9
6.3 Name conversion rules . 9
6.4 Mapping of JSON Values . 10
6.4.1 JSON Numbers . 10
6.4.2 JSON Strings . 11
6.4.3 JSON Arrays . 12
6.4.4 JSON Objects. 13
6.4.5 JSON Literals. 15
7 Using JSON to exchange data between TTCN-3 and other systems . 16
7.1 General rules . 16
7.2 JSON representations of TTCN-3 values . 17
7.2.1 Character strings . 17
7.2.2 Binary Strings . 17
7.2.3 Integer . 17
7.2.4 Float . 18
7.2.5 Boolean . 18
7.2.6 Enumerated . 18
7.2.7 Verdicttype . 19
7.2.8 Record and set . 19
7.2.9 Record of, set of and arrays . 20
7.2.10 Union and anytype . 21
7.2.11 Object Identifiers . 22
8 JSON representations of TTCN-3 values based on ASN.1 types . 22
8.1 General rules . 22
8.2 Character strings . 23
8.3 Binary strings . 23
8.4 BOOLEAN . 23
8.5 ENUMERATED . 23
8.6 REAL . 23
8.7 INTEGER . 23
8.8 OBJID . 23
8.9 NULL . 23
8.10 SEQUENCE and SET . 24
8.11 SEQUENCE OF and SET OF . 24
8.12 CHOICE and Open Types . 24
Annex A (normative): TTCN-3 module JSON . 25
ETSI
4 Final draft ETSI ES 201 873-11 V4.10.1 (2023-03)
Annex B (normative): Encoding instructions . 27
B.1 General . 27
B.2 The JSON encode attribute . 27
B.3 Encoding instructions . 27
B.3.1 General rules . 27
B.3.2 JSON type identification . 28
B.3.3 Normalizing JSON Values . 28
B.3.4 Name as . 28
B.3.5 Number of fraction digits . 29
B.3.6 Use the Minus sign . 30
B.3.7 Escape as . 30
B.3.8 Omit as null . 31
B.3.9 Default . 31
B.3.10 As value . 32
B.3.11 No Type . 33
B.3.12 Use order . 33
B.3.13 Error behaviour . 33
Annex C (informative): Bibliography . 35
History . 36

ETSI
5 Final draft ETSI ES 201 873-11 V4.10.1 (2023-03)
Intellectual Property Rights
Essential patents
IPRs essential or potentially essential to normative deliverables may have been declared
...


ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 11: Using JSON with TTCN-3

2 ETSI ES 201 873-11 V4.10.1 (2023-05)

Reference
RES/MTS-20187311v4.10.1
Keywords
JSON, language, testing, TTCN-3

ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - APE 7112B
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° w061004871

Important notice
The present document can be downloaded from:
https://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the prevailing version of an ETSI
deliverable is the one made publicly available in PDF format at www.etsi.org/deliver.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
If you find a security vulnerability in the present document, please report it through our
Coordinated Vulnerability Disclosure Program:
https://www.etsi.org/standards/coordinated-vulnerability-disclosure
Notice of disclaimer & limitation of liability
The information provided in the present deliverable is directed solely to professionals who have the appropriate degree of
experience to understand and interpret its content in accordance with generally accepted engineering or
other professional standard and applicable regulations.
No recommendation as to products and services or vendors is made or should be implied.
No representation or warranty is made that this deliverable is technically accurate or sufficient or conforms to any law
and/or governmental rule and/or regulation and further, no representation or warranty is made of merchantability or fitness
for any particular purpose or against infringement of intellectual property rights.
In no event shall ETSI be held liable for loss of profits or any other incidental or consequential damages.

Any software contained in this deliverable is provided "AS IS" with no warranties, express or implied, including but not
limited to, the warranties of merchantability, fitness for a particular purpose and non-infringement of intellectual property
rights and ETSI shall not be held liable in any event for any damages whatsoever (including, without limitation, damages
for loss of profits, business interruption, loss of information, or any other pecuniary loss) arising out of or related to the use
of or inability to use the software.
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and
microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© ETSI 2023.
All rights reserved.
ETSI
3 ETSI ES 201 873-11 V4.10.1 (2023-05)
Contents
Intellectual Property Rights . 5
Foreword . 5
Modal verbs terminology . 5
1 Scope . 6
2 References . 6
2.1 Normative references . 6
2.2 Informative references . 6
3 Definition of terms, symbols and abbreviations . 7
3.1 Terms . 7
3.2 Symbols . 7
3.3 Abbreviations . 7
4 Introduction . 8
5 Conformance and compatibility . 8
6 Using TTCN-3 as JSON Schema . 9
6.1 Approach . 9
6.2 Validation of JSON Values . 9
6.3 Name conversion rules . 9
6.4 Mapping of JSON Values . 10
6.4.1 JSON Numbers . 10
6.4.2 JSON Strings . 11
6.4.3 JSON Arrays . 12
6.4.4 JSON Objects. 13
6.4.5 JSON Literals. 15
7 Using JSON to exchange data between TTCN-3 and other systems . 16
7.1 General rules . 16
7.2 JSON representations of TTCN-3 values . 17
7.2.1 Character strings . 17
7.2.2 Binary Strings . 17
7.2.3 Integer . 17
7.2.4 Float . 18
7.2.5 Boolean . 18
7.2.6 Enumerated . 18
7.2.7 Verdicttype . 19
7.2.8 Record and set . 19
7.2.9 Record of, set of and arrays . 20
7.2.10 Union and anytype . 21
7.2.11 Object Identifiers . 22
8 JSON representations of TTCN-3 values based on ASN.1 types . 22
8.1 General rules . 22
8.2 Character strings . 23
8.3 Binary strings . 23
8.4 BOOLEAN . 23
8.5 ENUMERATED . 23
8.6 REAL . 23
8.7 INTEGER . 23
8.8 OBJID . 23
8.9 NULL . 23
8.10 SEQUENCE and SET . 24
8.11 SEQUENCE OF and SET OF . 24
8.12 CHOICE and Open Types . 24
Annex A (normative): TTCN-3 module JSON . 25
ETSI
4 ETSI ES 201 873-11 V4.10.1 (2023-05)
Annex B (normative): Encoding instructions . 27
B.1 General . 27
B.2 The JSON encode attribute . 27
B.3 Encoding instructions . 27
B.3.1 General rules . 27
B.3.2 JSON type identification . 28
B.3.3 Normalizing JSON Values . 28
B.3.4 Name as . 28
B.3.5 Number of fraction digits . 29
B.3.6 Use the Minus sign . 30
B.3.7 Escape as . 30
B.3.8 Omit as null . 31
B.3.9 Default . 31
B.3.10 As value . 32
B.3.11 No Type . 33
B.3.12 Use order . 33
B.3.13 Error behaviour . 33
Annex C (informative): Bibliography . 35
History . 36

ETSI
5 ETSI ES 201 873-11 V4.10.1 (2023-05)
Intellectual Property Rights
Essential patents
IPRs essential or potentially essential to normative deliverables may have been declared to ETSI. The declarations
pertaining to these essential IP
...


SLOVENSKI STANDARD
01-junij-2023
Metode za preskušanje in specificiranje (MTS) - 3. različica zapisa preskušanja in
krmiljenja preskusov - 11. del: Uporaba JSON v TTCN-3
Methods for Testing and Specification (MTS) - The Testing and Test Control Notation
version 3 - Part 11: Using JSON with TTCN-3
Ta slovenski standard je istoveten z: ETSI ES 201 873-11 V4.10.1 (2023-05)
ICS:
33.040.01 Telekomunikacijski sistemi Telecommunication systems
na splošno in general
35.060 Jeziki, ki se uporabljajo v Languages used in
informacijski tehniki in information technology
tehnologiji
2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.

ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 11: Using JSON with TTCN-3

2 ETSI ES 201 873-11 V4.10.1 (2023-05)

Reference
RES/MTS-20187311v4.10.1
Keywords
JSON, language, testing, TTCN-3

ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - APE 7112B
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° w061004871

Important notice
The present document can be downloaded from:
https://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the prevailing version of an ETSI
deliverable is the one made publicly available in PDF format at www.etsi.org/deliver.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
If you find a security vulnerability in the present document, please report it through our
Coordinated Vulnerability Disclosure Program:
https://www.etsi.org/standards/coordinated-vulnerability-disclosure
Notice of disclaimer & limitation of liability
The information provided in the present deliverable is directed solely to professionals who have the appropriate degree of
experience to understand and interpret its content in accordance with generally accepted engineering or
other professional standard and applicable regulations.
No recommendation as to products and services or vendors is made or should be implied.
No representation or warranty is made that this deliverable is technically accurate or sufficient or conforms to any law
and/or governmental rule and/or regulation and further, no representation or warranty is made of merchantability or fitness
for any particular purpose or against infringement of intellectual property rights.
In no event shall ETSI be held liable for loss of profits or any other incidental or consequential damages.

Any software contained in this deliverable is provided "AS IS" with no warranties, express or implied, including but not
limited to, the warranties of merchantability, fitness for a particular purpose and non-infringement of intellectual property
rights and ETSI shall not be held liable in any event for any damages whatsoever (including, without limitation, damages
for loss of profits, business interruption, loss of information, or any other pecuniary loss) arising out of or related to the use
of or inability to use the software.
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying and
microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© ETSI 2023.
All rights reserved.
ETSI
3 ETSI ES 201 873-11 V4.10.1 (2023-05)
Contents
Intellectual Property Rights . 5
Foreword . 5
Modal verbs terminology . 5
1 Scope . 6
2 References . 6
2.1 Normative references . 6
2.2 Informative references . 6
3 Definition of terms, symbols and abbreviations . 7
3.1 Terms . 7
3.2 Symbols . 7
3.3 Abbreviations . 7
4 Introduction . 8
5 Conformance and compatibility . 8
6 Using TTCN-3 as JSON Schema . 9
6.1 Approach . 9
6.2 Validation of JSON Values . 9
6.3 Name conversion rules . 9
6.4 Mapping of JSON Values . 10
6.4.1 JSON Numbers . 10
6.4.2 JSON Strings . 11
6.4.3 JSON Arrays . 12
6.4.4 JSON Objects. 13
6.4.5 JSON Literals. 15
7 Using JSON to exchange data between TTCN-3 and other systems . 16
7.1 General rules . 16
7.2 JSON representations of TTCN-3 values . 17
7.2.1 Character strings . 17
7.2.2 Binary Strings . 17
7.2.3 Integer . 17
7.2.4 Float . 18
7.2.5 Boolean . 18
7.2.6 Enumerated . 18
7.2.7 Verdicttype . 19
7.2.8 Record and set . 19
7.2.9 Record of, set of and arrays . 20
7.2.10 Union and anytype . 21
7.2.11 Object Identifiers . 22
8 JSON representations of TTCN-3 values based on ASN.1 types . 22
8.1 General rules . 22
8.2 Character strings . 23
8.3 Binary strings . 23
8.4 BOOLEAN . 23
8.5 ENUMERATED . 23
8.6 REAL . 23
8.7 INTEGER . 23
8.8 OBJID . 23
8.9 NULL . 23
8.10 SEQUENCE and SET . 24
8.11 SEQUENCE OF and SET OF . 24
8.12 CHOICE and Open Types . 24
Annex A (normative): TTCN-3 module JSON . 25
ETSI
4 ETSI ES 201 873-11 V4.10.1 (2023-05)
Annex B (normative): Encoding instructions . 27
B.1 General . 27
B.2 The JSON encode attribute . 27
B.3 Encoding instructions . 27
B.3.1 General rules . 27
B.3.2 JSON type identification . 28
B.3.3 Normalizing JSON Values . 28
B.3.4 Name as . 28
B.3.5 Number of fraction digits . 29
B.3.6 Use the Minus sign . 30
B.3.7 Escape as . 30
B.3.8 Omit as null . 31
B.3.9 Default . 31
B.3.10 As value . 32
B.3.11 No Type .
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.