[erlang-questions] Decode ASN.1 values to Map

zxq9 zxq9@REDACTED
Wed Nov 16 01:23:32 CET 2016

On 2016年11月15日 火曜日 15:35:32 Abimbola Adegun wrote:
> Hello,
> Does anyone know a way to decode ASN.1 encoded values to a Map structure
> using Erlang?

Sure, assuming you've got the ASN.1 schema.

Converting "from ASN.1 to a map" is never a 1::1 conversion, so there will
be an intermediate step involved but it is not difficult, though writing
the conversion function(s) may be tedious the one time you have to do it.

The information flow goes:

1. ASN.1 -> mapped Erlang values
2. mapped Erlang values -> Whatever else you want (a map)

Just like interpreting any other external data. (Even BERT values are not
read-made for internal use, not to mention the circus surrounding JSON.)

Providing concrete advice would be a lot easier if you have the schema and
sample data, or a cut down example to illustrate the point.


PS: Hi, list. I'm back!

More information about the erlang-questions mailing list