Skip to content

Remove to/from json methods on typestates#835

Merged
arminsabouri merged 1 commit intopayjoin:masterfrom
arminsabouri:remove-tofrom-ffi-json
Jul 2, 2025
Merged

Remove to/from json methods on typestates#835
arminsabouri merged 1 commit intopayjoin:masterfrom
arminsabouri:remove-tofrom-ffi-json

Conversation

@arminsabouri
Copy link
Collaborator

Now that we have proper session peristance in
0.24 we should remove these one off to/from json method as to descourage devs from creating their own custom peristance strategies.

Resolves #834

Now that we have proper session peristance in
[0.24](https://github.com/payjoin/rust-payjoin/releases/tag/payjoin-0.24.0)
we should remove these one off to from json method as to descourage devs
from creating their own peristance strategies.

Resolves payjoin#834
@arminsabouri arminsabouri requested a review from spacebear21 July 1, 2025 14:48
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 16002687643

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 85.487%

Totals Coverage Status
Change from base Build 15983582431: 0.0%
Covered Lines: 7251
Relevant Lines: 8482

💛 - Coveralls

Copy link
Collaborator

@spacebear21 spacebear21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code ACK.

To confirm my understanding: the session persister uses JSON internally when calling save/load? So implementers would provide e.g. a k/v store or SQL table with a JSON value column and the session persister would take care of de/serialization?

@arminsabouri
Copy link
Collaborator Author

code ACK.

To confirm my understanding: the session persister uses JSON internally when calling save/load? So implementers would provide e.g. a k/v store or SQL table with a JSON value column and the session persister would take care of de/serialization?

Yes, this is correct. More accurately the UniFFI exported Json Persister abstract class uses JSON internally in the save and load methods. We could also export other abstract classes that use different encodings (bincode, cbor, etc...)

@arminsabouri arminsabouri merged commit c3f1ce2 into payjoin:master Jul 2, 2025
13 checks passed
@arminsabouri arminsabouri deleted the remove-tofrom-ffi-json branch July 2, 2025 02:45
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.

Remove to/from json methods from uniffi exported typestates

3 participants