0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-03 07:31:54 +00:00
bird/yang/json-cbor-yang.py

12 lines
167 B
Python
Raw Permalink Normal View History

2023-11-15 11:31:42 +00:00
import sys
2023-11-15 12:56:37 +00:00
import JSON_CBOR
2023-11-15 11:31:42 +00:00
#print(sys.argv[1])
2023-11-15 12:56:37 +00:00
msg = JSON_CBOR.Message(sys.argv[1], "json")
2023-11-15 11:31:42 +00:00
with open(sys.argv[2], "wb") as of:
msg.dump_cbor(of)
2023-11-15 11:31:42 +00:00
print("OK")