Chapter 14. Generated JSON Decode Methods

Table of Contents

Generated Method Format and Calling Parameters
Procedure for Calling Java JSON Decode Methods
Reuse of Java Decoding Objects

For each ASN.1 production defined in the ASN.1 source file, a decode method may be generated. This method will decode an ASN.1 message into public member variables within the Java object.

As was the case for encode methods, a decode method is only generated if it is required to alter the behavior of the base class. The Java model is built on inheritance from a set of common run-time base classes. These run-time classes contain default implementations of encode/decode methods that handle the encoding/decoding of the basic types.

Note

As of version 7.3, ASN1C supports ITU-T X.697 JER. BACKWARD COMPATIBILITY: Prior versions (starting with asn1c 6.6) used proprietary encoding rules for JSON, as this work predated the development of ITU-T X.697. If you need to work with our proprietary encoding rules, you must use the command-line arguments -compat 729 (or an older version number). We urge you to upgrade to using X.697 JER.

Our proprietary rules, and differences with X.697, are available on our website.