The ASN1C code generation tool translates an Abstract Syntax Notation 1 (ASN.1) or XML Schema Definitions (XSD) source file into computer language source files that allow typed data to be encoded/decoded. This release of ASN1C includes options to generate code in the following languages: C, C++, C#, Java, Python, or Go. This manual discusses the Go code generation capabilities. The following manuals discuss the other language code generation capabilities:
ASN1C C/C++ Compiler User's Manual : C/C++ code generation
ASN1C C# Compiler User's Manual : C# code generation
ASN1C Java Compiler User's Manual : Java code generation
ASN1C Python Compiler User's Manual : Python code generation
Each ASN.1 module that is encountered in an ASN.1 schema source file results in the generation of a Go source file. The name of the file is the ASN.1 module name, with hyphens removed and changed to camel-case, and an extension of '.go'.
There is also a set of functions that form the run-time component of the Go package. These functions provide primitive component building blocks that are assembled by the compiler to encode/decode complex structures. They also provide support for managing message buffers that hold the encoded message components.
This release of the ASN1C Compiler for Go works with the version of ASN.1 specified in ITU-T international standards X.680 through X.683. It generates code for encoding/decoding data in accordance with the following encoding rules:
Packed Encoding Rules (PER) as published in the ITU-T X.691 and ISO/IEC 8825-2 standards. Includes both the aligned and unaligned variants (note: the unaligned variant is commonly known as UPER).
JSON Encoding Rules (JER) as published in the ITU-T X.697 and ISO/IEC 8825-8 standards.
ASN1C for Go is capable of parsing all ASN.1 syntax as defined in the standards. It is capable of parsing advanced syntax including Information Object Specifications as defined in ITU-T X.681 as well as Parameterized Types as defined in ITU-T X.683.