Skip to content

Conversation

@rgm
Copy link
Owner

@rgm rgm commented Jun 5, 2025

The next.jdbc-suggested changes to make JSON decoding automatic apply to the whole JVM. If they're applied, then decoding metadata off of features will fail because the adapter has been assuming it's being handed a raw postgres object and calling .getValue.

This patch makes the decoding more defensive, and lets it fail gently, since right now the only metadata examined at all is the :expires-at key. If we miss decoding this, then we just don't get expiry warnings.

Fixes #3.

The next.jdbc-suggested changes to make JSON decoding automatic apply to
the whole JVM. If they're applied, then decoding metadata off of
features will fail because the adapter has been assuming it's being
handed a raw postgres object and calling `.getValue.`

This patch makes the decoding more defensive, and lets it fail gently,
since right now the only metadata examined at all is the `:expires-at`
key. If we miss decoding this, then we just don't get expiry warnings.

Fixes #3.
@rgm rgm force-pushed the deserialization-flag branch from e264ef9 to ff6bea0 Compare June 5, 2025 23:58
@rgm rgm merged commit b527f52 into main Jun 6, 2025
1 check passed
@rgm rgm deleted the deserialization-flag branch June 6, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow JSON/JSONB serialization and deserialization in the PostgreSQL adapter to be handled by library consumers

2 participants