0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-13 22:58:42 +00:00
bird/yang/cbor-json-yang.py

14 lines
205 B
Python
Raw Normal View History

2023-11-15 12:56:37 +00:00
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")