mirror of
https://github.com/Instadapp/chains.git
synced 2024-07-29 22:37:19 +00:00
parent
4fe1b852e2
commit
4ea7eef329
|
@ -38,8 +38,10 @@ private fun createOutputFiles() {
|
|||
val chainJSONArray = JsonArray<JsonObject>()
|
||||
val miniChainJSONArray = JsonArray<JsonObject>()
|
||||
|
||||
allChainFiles.forEach {
|
||||
val jsonObject = Klaxon().parseJsonObject(it.reader())
|
||||
allChainFiles
|
||||
.map { Klaxon().parseJsonObject(it.reader()) }
|
||||
.sortedBy { (it["chainId"] as Number).toLong() }
|
||||
.forEach { jsonObject ->
|
||||
chainJSONArray.add(jsonObject)
|
||||
fullJSONFile.writeText(chainJSONArray.toJsonString())
|
||||
prettyJSONFile.writeText(chainJSONArray.toJsonString(prettyPrint = true))
|
||||
|
|
Loading…
Reference in New Issue
Block a user