fix(deps): update dependency com.squareup.moshi:moshi to v1.15.1 #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.8.0
->1.15.1
Release Notes
square/moshi (com.squareup.moshi:moshi)
v1.15.1
2024-01-30
3.7.0
v1.15.0
2023-05-12
1.8.21
.1.8.21-1.0.11
.0.6.0
.1.13.2
.1.9.0
in KAPT.UNUSED_PARAMETER
in generated code.v1.14.0
2022-09-06
v1.13.0
2021-12-08
New: Support for [Kotlin Symbol Processing (KSP)][ksp]. KSP is an alternative to annotation
processing code gen. It's builds faster and better supports Kotlin language features.
To use KSP in your application you must enable the KSP Gradle plugin and add a KSP dependency
on Moshi codegen.
If you're switching from annotation processing (kapt) to KSP, you should remove the kapt plugin
and the kapt Moshi dependency.
New:
@Json(ignore = true)
is a Moshi-specific way to exclude properties from JSON encodingand decoding.
New: Support Java 16 records. (Moshi still requires Java 8 only; we're shipping a [multi-release
jar][mrjar] to better support modern JVMs.)
New: Option to disable generating R8/ProGuard files. These files prevent code shrinkers from
removing files that support JSON processing. If you're not using ProGuard or R8, you can skip
this step.
Upgrade: [Kotlin 1.6.0][kotlin_1_6_0].
v1.12.0
2021-04-01
@SuppressLint
.v1.11.0
2020-10-04
New: Kotlin extension functions and properties. Use of these extensions is only possible from
Kotlin, and requires the Kotlin stdlib dependency. This release does not have any Kotlin
requirement and can be used Kotlin-free from Java.
New: Experimental Kotlin extensions. These depend on unreleased APIs and may break in a future
release of Kotlin. If you are comfortable with this, add
@ExperimentalStdlibApi
at the callsiteor add this argument to your Kotlin compiler:
"-Xopt-in=kotlin.ExperimentalStdlibApi"
.New:
JsonReader.nextSource()
. This returns an OkioBufferedSource
that streams the UTF-8bytes of a JSON value. Use this to accept JSON values without decoding them, to delegate to
another JSON processor, or for streaming access to very large embedded values.
New:
Moshi.Builder.addLast()
. Use this when installing widely-applicable adapter factories likeKotlinJsonAdapterFactory
. Adapters registered withadd()
are preferred (in the order theywere added), followed by all adapters registered with
addLast()
(also in the order they wereadded). This precedence is retained when
Moshi.newBuilder()
is used.New:
setTag()
,tag()
methods onJsonReader
andJsonWriter
. Use these as a side-channelbetween adapters and their uses. For example, a tag may be used to track use of unexpected
data in a custom adapter.
Fix: Don't crash with a
StackOverflowError
decoding backward-referencing type variables inKotlin. This caused problems for parameterized types like
MyInterface<E : Enum<E>>
.Upgrade: [Okio 1.17.5][okio_1_7_5].
Upgrade: [Kotlin 1.4.10][kotlin_1_4_10].
v1.10.0
2020-08-26
JsonReader.promoteNameToValue()
makes it easier to build customMap
adapters.Options.strings()
.PolymorphicJsonAdapterFactory.withFallbackJsonAdapter()
makes it possible to handleunrecognized types when encoding and decoding.
JsonWriter.jsonValue
APIArrayList
instead ofList
@Metadata
annotationsv1.9.3
2020-06-11
Foo::class
in the Kotlin adapter code generation.DefaultConstructorMarker
from the check forMetadata
. A shrinker may have removedMetadata
and we should still check forDefaultConstructorMarker
.v1.9.2
2019-11-17
classes enclosed in internal classes, deprecated types with
-Werror
, primitives in typeparameters, nullables in type parameters, and type aliases in type parameters.
v1.9.1
2019-10-30
a regression where classes with 33+ parameters would crash upon decoding.
parameters and classes with multiple constructors.
v1.9.0
2019-10-29
This release requires kotlin-reflect or moshi-kotlin-codegen for all Kotlin classes.
Previously Moshi wouldn't differentiate between Kotlin classes and Java classes if Kotlin was
not configured. This caused bad runtime behavior such as putting null into non-nullable fields!
If you attempt to create an adapter for a Kotlin type, Moshi will throw an
IllegalArgumentException
.Fix this with either the reflection adapter:
Or the codegen annotation processor:
The [Kotlin documentation][moshi_kotlin_docs] explains the required build configuration changes.
New: Change how Moshi's generated adapters call constructors. Previous generated code used a
combination of the constructor and
copy()
method to set properties that have default values.With this update we call the same synthetic constructor that Kotlin uses. This is less surprising
though it requires us to generate some tricky code.
New: Make
Rfc3339DateJsonAdapter
null-safe. Previously Moshi would refuse to decode null dates.Restore that behavior by explicitly forbidding nulls with
Rfc3339DateJsonAdapter().nonNull()
.New: Require Kotlin 1.3.50 or newer.
New:
JsonWriter.valueSink()
streams JSON-formatted data inline. Use this to do basic includesof raw JSON within a streamed document.
New: Support Gradle incremental processing in code gen.
New: Improve error messages. This includes better errors when field names and JSON names
disagree, and when failing on an unknown field.
New: Support default values in
PolymorphicJsonAdapterFactory
.New: Permit multiple labels for each subtype in
PolymorphicJsonAdapterFactory
. The first labelis used when writing an object to JSON.
New: Forbid automatic encoding of platform classes in
kotlinx
. As withjava.*
,android.*
,and
kotlin.*
Moshi wants you to specify how to encode platform types.New:
@JsonClass(generator=...)
makes it possible for third-party libraries to provide generatedadapters when Moshi's default adapters are insufficient.
Fix: Simplify wildcard types like
List<? extends Number>
to their base typesList<Number>
when finding type adapters. This is especially useful with Kotlin where wildcards may be added
automatically.
Fix: Use the correct name when the
@Json
annotation uses field targeting like@field:Json
.Fix: Support multiple transient properties in
KotlinJsonAdapter
.Fix: Don't explode attempting to resolve self-referential type variables like in
Comparable<T extends Comparable<T>>
.Fix: Don't infinite loop on
skipValue()
at the end an object or array. Also disallow callingskipValue()
at the end of a document.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.