python import cbor data = { "name": "Alice", "age": 25, "hobbies": ["reading", "swimming", "hiking"], "address": { "street": "123 Main St", "city": "New York", "country": "USA" } } encoded_data = cbor.dumps(data) print(encoded_data) decoded_data = cbor.loads(encoded_data) print(decoded_data)


上一篇:
下一篇:
切换中文