diff --git a/src/main/kotlin/conf/Clash.kt b/src/main/kotlin/conf/Clash.kt index 2265617..28ccd68 100644 --- a/src/main/kotlin/conf/Clash.kt +++ b/src/main/kotlin/conf/Clash.kt @@ -910,7 +910,7 @@ data class Clash( override val dialerProxy: String? = null, override val healthCheck: HealthCheck? = null, override val override: Override? = null, - val url: String? = null, // Changed from non-nullable to nullable + val url: String? = null, val path: String? = null, val proxy: String? = null, val sizeLimit: Long? = null, @@ -929,9 +929,9 @@ data class Clash( ) : ProxyProvider() data class HealthCheck( - val enable: Boolean? = null, // Changed from non-nullable to nullable - val url: String? = null, // Changed from non-nullable to nullable - val interval: Int? = null, // Changed from non-nullable to nullable + val enable: Boolean? = null, + val url: String? = null, + val interval: Int? = null, val timeout: Int? = null, val lazy: Boolean? = null, val expectedStatus: String? = null, diff --git a/src/main/kotlin/util/JacksonUtil.kt b/src/main/kotlin/util/JacksonUtil.kt index 352bf29..8302449 100644 --- a/src/main/kotlin/util/JacksonUtil.kt +++ b/src/main/kotlin/util/JacksonUtil.kt @@ -1,7 +1,6 @@ package util import com.fasterxml.jackson.databind.JsonNode -import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.node.ArrayNode import com.fasterxml.jackson.databind.node.JsonNodeFactory import com.fasterxml.jackson.databind.node.ObjectNode @@ -14,5 +13,4 @@ fun newArrayNode(list: List): ArrayNode = JsonNodeFactory.instance.arr fun newTextNode(text: String): TextNode = JsonNodeFactory.instance.textNode(text) - fun newObjectNode(map: Map): ObjectNode = JsonNodeFactory.instance.objectNode().apply { map.forEach { replace(it.key, it.value) } } \ No newline at end of file