This is an approach to generate dynamically a JSON representation of an OID tree (=an(y) SNMP MIB) using mibdump.py of python pysmi.
We will generate a flat list of OID objects (oid_catalog.json) + hierarchical json tree (oid_tree.json) with "."-separated nodes of RFC 1213 MIB.
$ pip install pysmi
# walk into and/or create a new directory you run the following command in
$ mibdump.py --destination-format=json --generate-mib-texts --build-index --mib-stub= RFC1213-MIB