Showing results for kotlin json deserialize
Search instead for kotlin jsondeserialize
🌐
Kotlin
kotlinlang.org › api › kotlinx.serialization › kotlinx-serialization-json › kotlinx.serialization.json › -json
Json | kotlinx.serialization – Kotlin Programming Language
Decodes and deserializes the given JSON string to the value of type T using deserializer retrieved from the reified type parameter.
🌐
GitHub
github.com › pwall567 › json-kotlin
GitHub - pwall567/json-kotlin: JSON serialisation and deserialisation for Kotlin · GitHub
It uses Kotlin reflection to serialize and deserialize arbitrary objects, and it includes code to handle most of the Kotlin standard library classes. When instantiating deserialized objects it does not require the class to have a no-argument ...
Author: pwall567
🌐
ZetCode
zetcode.com › kotlin › json
Kotlin JSON - JSON serialization and deserialization in Kotlin
January 29, 2024 - The kotlinx.serialization is a Kotlin library for serialization. The toJson method serializes the specified object into its equivalent JSON representation.
🌐
Baeldung
baeldung.com › home › libraries › how to parse json without data class in kotlin
How to Parse JSON Without Data Class in Kotlin | Baeldung on Kotlin
March 19, 2024 - In this tutorial, we’ll explore possibilities to deserialize JSON when we cannot use a data class. We can use the Kotlin Map<String, Any?> generic map definition for dynamic content deserialization or parser-specific JSON representations.
🌐
Codecademy
codecademy.com › docs › kotlin › serialization › .decodefromstring()
Kotlin | Serialization | .decodeFromString() | Codecademy
December 7, 2023 - The .decodeFromString() function is provided by the Kotlin Serialization library, used for deserializing data from a string representation (in JSON format) into a Kotlin object.
🌐
Baeldung
baeldung.com › home › libraries › jackson support for kotlin
Jackson Support for Kotlin | Baeldung on Kotlin
August 26, 2026 - Next, when we deserialize the map, we need to make sure to specify the key and value types: @Test fun whenDeserializeMap_thenSuccess() { val json = """{"1":"one","2":"two"}""" val aMap: Map<Int,String> = mapper.readValue(json) assertEquals(aMap[1], "one") assertEquals(aMap[2], "two") } Now, we’ll see how to serialize collections in Kotlin.
🌐
GitHub
github.com › Kotlin › kotlinx.serialization › blob › master › docs › json.md
kotlinx.serialization/docs/json.md at master · Kotlin/kotlinx.serialization
For example, you might need to tweak the data before it can parse or otherwise work with such an unstructured data that it does not readily fit into the typesafe world of Kotlin serialization. The main concept in this part of the library is JsonElement. Read on to learn what you can do with it. A string can be parsed into an instance of JsonElement with the Json.parseToJsonElement function. It is called neither decoding nor deserialization because none of that happens in the process.
🌐
Kotlin
kotlinlang.org › docs › serialization.html
Serialization | Kotlin Documentation
1 month ago - Deserialization is the opposite process of converting external data back into a runtime object. Together, they are essential to most applications that exchange data with third parties.
Find elsewhere
🌐
SSOJet
ssojet.com › serialize-and-deserialize › serialize-and-deserialize-json-in-kotlin
Serialize and Deserialize JSON in Kotlin | Serialize and Deserialize Data in Programming Languages
Always ensure your data classes and their properties are compatible. Once you have a JSON string, you can easily convert it back into a Kotlin object using the decodeFromString function from the kotlinx.serialization.json library.
🌐
Medium
medium.com › @zorbeytorunoglu › serialization-and-deserialization-on-kotlin-android-81596ac6da8e
Serialization and Deserialization on Kotlin /& Android | Medium
May 18, 2024 - Jackson: A high-performance JSON processor for Java. Protobuf: Protocol Buffers, a binary serialization format. Kotlin Serialization is a Kotlin library developed by JetBrains, providing a native way to serialize and deserialize Kotlin objects.
🌐
Kotlin
kotlinlang.org › api › kotlinx.serialization › kotlinx-serialization-json › kotlinx.serialization.json › -json-content-polymorphic-serializer
JsonContentPolymorphicSerializer | kotlinx.serialization – Kotlin Programming Language
Second, selectDeserializer function is called to determine which serializer should be used. The returned serializer is used to deserialize JsonElement back to Kotlin object.
🌐
Kotlin
kotlinlang.org › docs › serialization-configure-json-serialization.html
JSON serialization overview | Kotlin Documentation
1 month ago - Deserialize JSON strings back to Kotlin objects with the decodeFromString() function. Work directly with the JsonElement when handling complex JSON structures using the encodeToJsonElement() and the decodeFromJsonElement() functions.
🌐
MojoAuth
mojoauth.com › serialize-and-deserialize › serialize-and-deserialize-json-with-kotlin
Serialize and Deserialize JSON with Kotlin | Serialize & Deserialize Data Across Languages
September 20, 2025 - Working with JSON data in Kotlin can become cumbersome without the right tools. This guide shows you how to efficiently serialize Kotlin objects into JSON strings and deserialize JSON into Kotlin objects using libraries like kotlinx.serialization. You'll learn to handle common data structures and configurations.
🌐
Medium
medium.com › @midoripig1009 › working-with-json-in-kotlin-parsing-and-serialization-a62300ec43b8
Working with JSON in Kotlin: Parsing and Serialization | by CuriousCat | Medium
October 28, 2023 - Parsing JSON in Kotlin is straightforward with kotlinx.serialization. You define a data class and deserialize the JSON into an instance of that class.
🌐
Medium
medium.com › @kerry.bisset › kotlin-serialization-json-mistakes-i-made-with-polymorphism-and-more-e8ae367dc90a
Kotlin Serialization — Json mistakes I made with Polymorphism and More. | by Kerry Bisset | Medium
July 15, 2024 - ignoreUnknownKeys: When enabled, unknown keys in the input JSON are ignored during deserialization, preventing errors when the JSON structure doesn't exactly match the expected Kotlin data class.
🌐
Medium
medium.com › lightricks-tech-blog › using-the-kotlin-serialization-library-for-tough-json-serialization-82f8b7ae70dc
Kotlin serialization library for JSON serialization | Lightricks Tech Blog
June 29, 2022 - The transformation is like taking these building blocks and reorganizing them in the way we would like them to be. ... The Kotlin serializer deserializes the JSON file to JSON elements.
🌐
Medium
medium.com › javarevisited › type-driven-deserialization-in-kotlin-using-jackson-a0b2b5a729a1
Type driven Deserialization in Kotlin using Jackson | by Janani Subbiah | Javarevisited | Medium
October 2, 2024 - data class Person( val name: String, val type: PersonType, @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type", visible = true ) @JsonSubTypes(value = [ JsonSubTypes.Type(value = Student::class, name = "student"), JsonSubTypes.Type(value = Employee::class, name = "employee") ]) val info: PersonInfo ) enum class PersonType { @JsonProperty("student") STUDENT, @JsonProperty("employee") EMPLOYEE } interface PersonInfo data class Student( val grade: Int ): PersonInfo data class Employee( val salary: Int ): PersonInfo · Now if we wanted to test
🌐
DhiWise
dhiwise.com › post › how-to-streamline-data-processing-with-kotlin-json
Mastering Kotlin JSON Serialization for Efficient Data ...
July 10, 2024 - One such feature is prettyPrint, ... from an input stream is another advanced technique that enables developers to handle a continuous flow of JSON data efficiently....