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

14 lines
196 B
Python

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