示例#1
0
 protected Long readLong(JSONObject jsonObject, String fieldLabel, int fieldNumber)
     throws InvalidProtocolBufferException {
   Long fieldLong = null;
   if (jsonObject != null && fieldLabel != null) {
     JSONValue fieldValue = jsonObject.get(fieldLabel);
     if (fieldValue != null) {
       fieldLong = jsonValueToLong(fieldValue);
       if (fieldLong == null) {
         throw InvalidProtocolBufferException.failedToReadLong(fieldLabel);
       }
     }
   }
   return fieldLong;
 }