0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00
bird/yang/cbor-json-yang.py
2023-11-15 13:56:37 +01:00

14 lines
205 B
Python

import cbor
import json
import sys
import JSON_CBOR
#print(sys.argv[1])
msg = JSON_CBOR.Message(sys.argv[1], "cbor")
with open(sys.argv[2], "w") as of:
json.dump(msg.raw, of, indent=2)
print("OK")