function structProtoToJson()

in botlib/proto_to_json.js [25:34]


function structProtoToJson(proto) {
  if (!proto || !proto.fields) {
    return {};
  }
  const json = {};
  for (const field in proto.fields) {
    json[field] = valueProtoToJson(proto.fields[field]);
  }
  return json;
}