JsonNull 是 JsonElement 但不是 JsonObject JsonElement element = source.get(propertyName); if(!(element instanceof JsonNull)){ JsonObject propertyToBeCopied =(JsonObject)element; }