fix: 本地导入没有包含在数组内的单个书源时无法解析

This commit is contained in:
Xwite
2023-03-18 09:17:06 +08:00
parent 2992ecab9d
commit dda6abdfc3
2 changed files with 2 additions and 1 deletions
@@ -51,7 +51,7 @@ object SourceAnalyzer {
val bookSources = mutableListOf<BookSource>()
val documentContext = jsonPath.parse(inputStream)
kotlin.runCatching {
val items: List<Map<String, Any> = documentContext.read("$")
val items: List<Map<String, Any>> = documentContext.read("$")
for (item in items) {
val jsonItem = jsonPath.parse(item)
jsonToBookSource(jsonItem.jsonString()).getOrThrow().let {