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.
/** Extension alternative to [Types.nextAnnotations()]. */
fun <reified T : Annotation> Set<Annotation>.nextAnnotations(): Set<Annotation>?
/** Extension alternative to [Types.getRawType()]. /
val Type.rawType: Class<>
/** Extension alternative to [Types.arrayOf()]. /
fun KClass<>.asArrayType(): GenericArrayType
/** Extension alternative to [Types.arrayOf()]. */
fun Type.asArrayType(): GenericArrayType
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 callsite
or add this argument to your Kotlin compiler: "-Xopt-in=kotlin.ExperimentalStdlibApi".
/** Returns the adapter for [T]. */
inline fun <reified T> Moshi.adapter(): JsonAdapter<T>
/** Returns the adapter for [ktype]. */
fun <T> Moshi.adapter(ktype: KType): JsonAdapter<T>
/** Adds an adapter for [T]. */
inline fun <reified T> Moshi.Builder.addAdapter(adapter: JsonAdapter<T>): Moshi.Builder
/** Extension alternative to [Types.arrayOf()]. */
fun KType.asArrayType(): GenericArrayType
/** Extension alternative to [Types.subtypeOf()]. */
inline fun <reified T> subtypeOf(): WildcardType
/** Extension alternative to [Types.supertypeOf()]. */
inline fun <reified T> supertypeOf(): WildcardType
New: JsonReader.nextSource(). This returns an Okio BufferedSource that streams the UTF-8
bytes 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 like
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Bumps moshi from 1.10.0 to 1.11.0.
Changelog
Sourced from moshi's changelog.
Commits
4d3ca9a
Prepare for release 1.11.0.230c3d8
Promote Kotlin type-inferring APIs to the main Moshi package (round 2!) (#1202)f17e7c2
Fix infinite loop with type var variance stripping + remove from API (#1246)5ce0928
Fix some misc deprecated KotlinPoet APIs (#1249)850dc20
Fix snapshots by upping metaspace size (#1247)8fe26e9
Updated Moshi Download version to 1.10.0f192473
Standardize (almost) all tests on Truth (#1242)acb2836
Merge pull request #1241 from ZacSweers/z/betterJcenterHandling45ef3da
Use exclusiveContent API for jcenterbc85227
Add JsonString recipe to examples (#1230)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)