You can use ASN.1 regardless of whether you need to serialize messages that can be sent to the recipient using C, C ++, C #, Java or any other programming language using the ASN.1 encoding / decoding mechanism. ASN.1 also provides several encoding rules that are advantageous in a variety of circumstances. For example, DER is used when canonical encoding is critical, for example, in digital certificates, while PER is used when bandwidth is critical, for example, in cellular protocols, and E-XER is used when you don't need bandwidth and you want to display encoding in XML for maniplulation in a browser or messaging with the XML Schema engine.
Please note that with a good ASN.1 tool you do not need to change the application code to switch between these ASN.1 encoding rules. A simple function call can choose the encoding rules that you would like to use.
source share