ASN.1 Vs JSON When Is Is Appropriate To Use Them?
Answer : ASN.1 and JSON aren't strictly comparable. JSON is a data format. ASN.1 is a schema language plus multiple sets of encoding rules, each of which produces different data formats for a given schema. So, the original question somewhat parallels the question "XML Schema vs. XML: when is it appropriate to use them?" A fairer comparison would be between ASN.1 and JSON Schema. That said, a few points to consider: ASN.1 has binary encoding rules. Consider whether binary or text encoding is preferable for your application. ASN.1 also has XML and JSON encoding rules. You can opt to go with a text-based encoding using ASN.1, if you like. ASN.1 allows other encoding rules to be developed. Before ITU-T specified encoding rules for JSON, we specified our own rules to encode ASN.1 to JSON. I blogged about this on our company website here As with XML Schema, tools exist for compiling ASN.1. These are commonly referred to as data binding tools. The compiler ...