Stay organized with collections
Save and categorize content based on your preferences.
class MalformedJsonException : IOException
Thrown when a reader encounters malformed JSON. Some syntax errors can be ignored by calling JsonReader.setLenient(boolean)
.
Summary
Public constructors
MalformedJsonException(message: String!)
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# MalformedJsonException\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nMalformedJsonException\n======================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/util/MalformedJsonException \"View this page in Java\") \n\n```\nclass MalformedJsonException : IOException\n```\n\n|---|---|---|---|------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||\n| | ↳ | [java.lang.Exception](../../java/lang/Exception.html#) |||\n| | | ↳ | [java.io.IOException](../../java/io/IOException.html#) ||\n| | | | ↳ | [android.util.MalformedJsonException](#) |\n\nThrown when a reader encounters malformed JSON. Some syntax errors can be ignored by calling [JsonReader.setLenient(boolean)](/reference/kotlin/android/util/JsonReader#setLenient(kotlin.Boolean)).\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [MalformedJsonException](#MalformedJsonException(kotlin.String))`(`message:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` \u003cbr /\u003e |\n\nPublic constructors\n-------------------\n\n### MalformedJsonException\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nMalformedJsonException(message: String!)\n```"]]