Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove new lines in deprecation warnings that break native #990

Merged
merged 1 commit into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions runtime/commonMain/src/kotlinx/serialization/json/Json.kt
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ private class JsonImpl(configuration: JsonConf) : Json(configuration) {

@Deprecated(
level = DeprecationLevel.ERROR,
message = "Deprecated in the favour of Json {} builder function during serialization 1.0 API stabilization.\n" +
message = "Deprecated in the favour of Json {} builder function during serialization 1.0 API stabilization. " +
"In order to migrate, please replace it with Json { } builder function. JsonBuilder receiver has the same " +
"properties as 'JsonConfiguration' and 'context' and should be configured there.\n" +
"properties as 'JsonConfiguration' and 'context' and should be configured there. " +
"Json(JsonConfiguration.Default) can be replaced with Json companion instead."
)
@Suppress("DEPRECATION_ERROR")
Expand All @@ -355,7 +355,7 @@ public fun Json(
*/
@Deprecated(
level = DeprecationLevel.ERROR,
message = "Deprecated in the favour of Json.Default companion during serialization 1.0 API stabilization.\n",
message = "Deprecated in the favour of Json.Default companion during serialization 1.0 API stabilization.",
replaceWith = ReplaceWith("Json")
)
public fun Json(
Expand All @@ -364,7 +364,7 @@ public fun Json(

@Deprecated(
level = DeprecationLevel.ERROR,
message = "Deprecated in the favour of Json {} builder function during serialization 1.0 API stabilization.\n",
message = "Deprecated in the favour of Json {} builder function during serialization 1.0 API stabilization.",
replaceWith = ReplaceWith("Json { allowStructuredMapKeys = true }") // stable configuration
)
public fun Json(
Expand All @@ -373,7 +373,7 @@ public fun Json(

@Deprecated(
level = DeprecationLevel.ERROR,
message = "Deprecated in the favour of Json {} builder function during serialization 1.0 API stabilization.\n",
message = "Deprecated in the favour of Json {} builder function during serialization 1.0 API stabilization.",
replaceWith = ReplaceWith("Json { serializersModule = context }")
)
public fun Json(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import kotlin.jvm.*

@Deprecated(
level = DeprecationLevel.ERROR,
message = "This class is deprecated for removal during serialization 1.0 API stabilization.\n" +
message = "This class is deprecated for removal during serialization 1.0 API stabilization. " +
"For configuring Json instances, the corresponding builder function can be used instead, e.g. instead of" +
"'Json(JsonConfiguration.Stable.copy(isLenient = true))' 'Json { isLenient = true }' should be used.\n" +
"'Json(JsonConfiguration.Stable.copy(isLenient = true))' 'Json { isLenient = true }' should be used. " +
"Instead of storing JsonConfiguration instances of the code, Json instances can be used directly:" +
"'Json(MyJsonConfiguration.copy(prettyPrint = true))' can be replaced with 'Json(from = MyApplicationJson) { prettyPrint = true }'"
)
Expand Down