JsonSerializer
Pre-configured Jackson ObjectMapper for the Wow framework.
This singleton provides a ready-to-use JSON serializer/deserializer with optimized settings for Kotlin classes and Wow-specific modules. It includes configurations for:
Field visibility set to ANY for all property accessors
Ignoring undefined JSON parser features
Disabling failure on unknown properties during deserialization
Kotlin module registration for better Kotlin support
Automatic registration of SPI-discovered Jackson modules
Example usage:
data class User(val name: String, val age: Int)
val user = User("John", 30)
val json = JsonSerializer.writeValueAsString(user)
val deserialized = JsonSerializer.readValue(json, User::class.java)Content copied to clipboard
See also
ObjectMapper
for base Jackson functionality