mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-25 21:23:55 +08:00
Use unstable Json API with guarantee;
Move plugin center from ./center to ./plugin/center
This commit is contained in:
parent
d25ff4b6e3
commit
d4271f670f
backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/center
@ -9,7 +9,7 @@
|
||||
|
||||
@file:OptIn(MiraiExperimentalAPI::class)
|
||||
|
||||
package net.mamoe.mirai.console.center
|
||||
package net.mamoe.mirai.console.plugin.center
|
||||
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.engine.cio.CIO
|
||||
@ -24,7 +24,9 @@ import net.mamoe.mirai.utils.MiraiExperimentalAPI
|
||||
import java.io.File
|
||||
|
||||
@OptIn(UnstableDefault::class)
|
||||
internal val json = Json(JsonConfiguration(isLenient = true, ignoreUnknownKeys = true))
|
||||
internal val json = runCatching {
|
||||
Json(JsonConfiguration(isLenient = true, ignoreUnknownKeys = true))
|
||||
}.getOrElse { Json(JsonConfiguration.Stable) }
|
||||
|
||||
@OptIn(KtorExperimentalAPI::class)
|
||||
internal val Http = HttpClient(CIO)
|
@ -7,7 +7,7 @@
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.console.center
|
||||
package net.mamoe.mirai.console.plugin.center
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
Loading…
Reference in New Issue
Block a user