docs: def json2pb(pb, js, useFieldNumber=False):
      ''' convert JSON string to google.protobuf.descriptor instance '''
      for field in pb.DESCRIPTOR.fields:
          if useFieldNumber:
              key = field.number
          else:
              key = field.name
          if key not in js:
              continue
          if field.type == FD.TYPE_MESSAGE:
              pass
          elif field.type in _js2ftype:
              ftype = _js2ftype[field.type]
          else:
              raise ParseError("Field %s.%s of type '%d' is not supported" % (pb.__class__.__name__, field.name, field.type, ))
          value = js[key]
          if field.label == FD.LABEL_REPEATED:
              pb_value = getattr(pb, field.name, None)
              for v in value:
                  if field.type == FD.TYPE_MESSAGE:
                      json2pb(pb_value.add(), v, useFieldNumber=useFieldNumber)
                  else:
                      pb_value.append(ftype(v))
          else:
              if field.type == FD.TYPE_MESSAGE:
                  json2pb(getattr(pb, field.name, None), value, useFieldNumber=useFieldNumber)
              else:
                  setattr(pb, field.name, ftype(value))
      return pb