mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2024-09-29 16:30:49 +00:00
Merge branch 'main' of https://github.com/vitorpamplona/amethyst
This commit is contained in:
commit
f42ec3c149
@ -33,8 +33,8 @@ import com.fasterxml.jackson.databind.JsonNode
|
|||||||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer
|
import com.fasterxml.jackson.databind.deser.std.StdDeserializer
|
||||||
import com.fasterxml.jackson.databind.module.SimpleModule
|
import com.fasterxml.jackson.databind.module.SimpleModule
|
||||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||||
|
import com.fasterxml.jackson.module.kotlin.readValue
|
||||||
import com.vitorpamplona.quartz.encoders.HexKey
|
import com.vitorpamplona.quartz.encoders.HexKey
|
||||||
import com.vitorpamplona.quartz.events.Event
|
|
||||||
import com.vitorpamplona.quartz.events.EventInterface
|
import com.vitorpamplona.quartz.events.EventInterface
|
||||||
import com.vitorpamplona.quartz.events.LnZapRequestEvent
|
import com.vitorpamplona.quartz.events.LnZapRequestEvent
|
||||||
|
|
||||||
@ -90,9 +90,7 @@ class Result(
|
|||||||
* Parses the json with a string of events to an Array of Event objects.
|
* Parses the json with a string of events to an Array of Event objects.
|
||||||
*/
|
*/
|
||||||
fun fromJsonArray(json: String): Array<Result> {
|
fun fromJsonArray(json: String): Array<Result> {
|
||||||
return Event.mapper.readTree(json).map {
|
return mapper.readValue(json)
|
||||||
fromJson(it.asText())
|
|
||||||
}.toTypedArray()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user