napperley
11/05/2018, 9:59 PMUncaught (in promise) SyntaxError: Unexpected token o in JSON at position 1
What does this error message signify??napperley
11/05/2018, 10:00 PMdata class Repo(
val id: String,
val name: String,
val description: String,
val webUrl: String,
val totalOpenIssues: Long,
val buildSystem: BuildSystem = BuildSystem.UNKNOWN,
val languages: Map<String, Double> = mapOf()
)
napperley
11/05/2018, 10:05 PM[ {
"id" : "3537664",
"name" : "fdroiddata-localizations",
"description" : "In order to give translators access to the descriptive text in _fdroiddata_, this project converts it to XLIFF format to sync it with Weblate. Then there are scripts to convert between the .txt format and the XLIFF format.",
"webUrl" : "<https://gitlab.com/fdroid/fdroiddata-localizations>",
"totalOpenIssues" : 0,
"buildSystem" : "UNKNOWN",
"languages" : {
"Python" : 98.54,
"Shell" : 1.46
}
}, {
"id" : "3397954",
"name" : "fdroid-website-legacy-forum",
"description" : "This is a wget scrape of <http://f-droid.org|f-droid.org> to get all of the posts from the Wordpress bbpress forum as static HTML",
"webUrl" : "<https://gitlab.com/fdroid/fdroid-website-legacy-forum>",
"totalOpenIssues" : 0,
"buildSystem" : "UNKNOWN",
"languages" : {
"HTML" : 99.96,
"CSS" : 0.04
}
}, {
"id" : "3376297",
"name" : "update-channels",
"description" : "Libraries to support various update channel mechanisms based on the F-Droid ecosystem.",
"webUrl" : "<https://gitlab.com/fdroid/update-channels>",
"totalOpenIssues" : 1,
"buildSystem" : "GRADLE",
"languages" : {
"Java" : 100.0
}
} ]
napperley
11/05/2018, 10:08 PMval repos = JSON.parse<Array<Repo>>("${resp.body}")
napperley
11/05/2018, 10:17 PMDico
11/05/2018, 10:38 PMnapperley
11/05/2018, 11:19 PMnapperley
11/05/2018, 11:27 PMkotlinx-coroutines-core.js:19616 TypeError: Cannot read property 'iterator' of undefined
at addAll (MutableCollections.kt:127)
at GroupStatistics.mainLanguage_e0v785$ (_Arrays.kt:8034)
at updateStatsLayout (main.kt:93)
at Coroutine$processFetchedRepos$lambda.doResume (main.kt:85)
at Coroutine$processFetchedRepos$lambda.CoroutineImpl.resumeWith_tl1gpc$ (CoroutineImpl.kt:47)
at CancellableContinuationImpl.DispatchedTask.run (kotlinx-coroutines-core.js:2682)
at WindowDispatcher$queue$ObjectLiteral.MessageQueue.process (kotlinx-coroutines-core.js:19877)
at kotlinx-coroutines-core.js:19846
😕 Appears as though the error comes from the KotlinX Coroutines library.jean
11/14/2018, 9:31 PM