in apisix/runner/utils/common.py [0:0]
def parse_dict_vector(cls: object, ty: int) -> dict:
res = {}
fn = dictVectorParseFuncNames.get(ty)
if not fn:
return res
length = getattr(cls, "%sLength" % fn)()
if not length or length == 0:
return res
for i in range(length):
key = getattr(cls, fn)(i).Name().decode()
val = getattr(cls, fn)(i).Value().decode()
res[key] = val
return res