diff --git a/README.md b/README.md index f936230e2..6c3dd87bb 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,15 @@ data class HelloWorld(val user: String) println(XML.encodeToString(HelloWorld("You!"))) ``` + +To deserialize you would do: +```kotlin +@Serializable +data class HelloWorld(val user: String) + +XML.decodeFromString(HelloWorld.serializer(), "") +``` + Please look at the examples and the documentation for further features that can influence: the tag names/namespaces used, the actual structure used (how lists and polymorphic types are handled), etc.