mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 14:37:44 +01:00
Specify return type as non-nullable asJackson will either return a non-null value or throw an exception.
This commit is contained in:
@@ -113,8 +113,8 @@ class AppMetadata {
|
||||
fun toJson() = assemble(this)
|
||||
|
||||
companion object {
|
||||
fun assemble(data: AppMetadata) = JsonMapper.mapper.writeValueAsString(data)
|
||||
fun assemble(data: AppMetadata): String = JsonMapper.mapper.writeValueAsString(data)
|
||||
|
||||
fun parse(content: String) = JsonMapper.mapper.readValue(content, AppMetadata::class.java)
|
||||
fun parse(content: String): AppMetadata = JsonMapper.mapper.readValue(content, AppMetadata::class.java)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user