Some data serialization formats, such as JSON and protocol buffers are particularly common. Together they are an essential part of most applications that exchange data with third parties. In turn, deserialization is the opposite process of reading data from an external source and converting it into a runtime object. For my project I'm using rialization and the issue at hand will be solved for that converter, but the concept is the same for the others.Serialization is the process of converting data used by an application to a format that can be transferred over a network or stored in a database or a file. The Ktor docs are great as a start and they even show you how to use three built-in converters ( Gson, Jackson and rialization). Eventually you will run into a situation where you need to either customize your serialization logic or provide a serialization implementation for a non-primitive value. The process of turning objects into JSON data is a common task and most of the time it's a non-issue turning an Int into a JSON number is simple, turning a String into a JSON string is simple and so on. If you're into Kotlin and you haven't tried Ktor yet, I highly suggest you try it out. This blog post will focus on an issue I ran into recently concerning to JSON serialization when using Ktor (adding contextual serialization). Ktor is a Kotlin framework for building web applications and HTTP services.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |