[Conditional Configurability] Better deserialization#3146
Merged
vegaro merged 1 commit intoFeb 27, 2026
Merged
Conversation
8a41e11 to
92e8e9a
Compare
vegaro
commented
Feb 26, 2026
| implementation(libs.commonmark) | ||
| implementation(libs.commonmark.strikethrough) | ||
|
|
||
| implementation(libs.kotlinx.serialization.json) |
Member
Author
There was a problem hiding this comment.
we already do this in the main module
Generated by 🚫 Danger |
50c68c4
into
cesar/conditional-configurability
27 of 28 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Now that we know the JSON is not changing, adjusted the logic to be simpler. Also found we can use
JSONPrimitiveand simplify things a lot.Note
Medium Risk
Changes core JSON deserialization/fallback behavior for paywall components and override conditions; malformed payloads will now preserve the declared
type, which could alter fallback outcomes in edge cases.Overview
Simplifies component override variable conditions by replacing the custom
ConditionValuesealed type/serializer with a rawJsonPrimitive, and updates variable-matching logic inPresentedPartialto interpret strings/booleans/numbers directly.Hardens
SealedDeserializerWithDefaultto handle non-object JSON and to preserve the discriminatortypewhen deserialization of a known type fails (instead of losing it), with expanded tests covering malformed known types, extra/unknown fields, andnullvariable values. Also promoteskotlinx-serialization-jsonto a runtime dependency inrevenuecatuisinceJsonPrimitiveparsing is now used in production code.Written by Cursor Bugbot for commit 92e8e9a. This will update automatically on new commits. Configure here.