0

I am receiving below mention data type as a result of service call. I need to parse this data, It doesn't seems like JSON or YANG, wondering what it is?

update {
  timestamp: 1513187126024174850
  prefix {
    elem {
      name: "interfaces"
    }
    elem {
      name: "interface"
      key {
        key: "name"
        value: "interface-0/0/0"
      }
   }

  }
Ammad
  • 4,031
  • 12
  • 39
  • 62

1 Answers1

1

That looks like "text format" Protocol Buffers. The format is used with proto2 for human-readable display. In proto3 JSON is preferred, although text format is still available. The protoc tool is able to convert between text and binary protobuf.

I'm not aware of a formal definition of the syntax, but it is fairly simplistic. There's some examples on this other question: What does the protobuf text format look like?

Eric Anderson
  • 24,057
  • 5
  • 55
  • 76