blob: 682e51aaa694dd9a0eaf3d1f62bd372fdf4ed0ea [file] [log] [blame]
Zsolt Harasztidafefe12016-11-14 21:29:58 -08001#!/usr/bin/env python
2
3"""
4Read adapter data while decoding both known custom fields
5"""
6
7import sys
8from json import dumps
9
10from common.utils.json_format import MessageToDict
11from voltha.protos import adapter_pb2
12
13adapter = adapter_pb2.Adapter()
14binary = sys.stdin.read()
15adapter.ParseFromString(binary)
16
17print dumps(MessageToDict(adapter, strict_any_handling=False))
18