Skip to content

CBL-8389 : Add Kotlin serialization-based APIs#496

Merged
pasin merged 1 commit into
release/4.1from
kotlin-serialization-port
Jun 9, 2026
Merged

CBL-8389 : Add Kotlin serialization-based APIs#496
pasin merged 1 commit into
release/4.1from
kotlin-serialization-port

Conversation

@pasin

@pasin pasin commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Ported Kotlin Serialization from master branch (5b0328a)

--

  • Implemented serialization-based API extensions
  • Collection.getDocumentAs(), save()
  • Result.data()
  • ResultSet.data()
  • Implemented Collection.delete(DocumentModel)

  • Allow null docID when saving new DocumentModel

  • Fixes from code review (not all fixed)

  • serializeToFleece() now returns a FLSliceResult not a ByteArray.
  • Callers of the above use use to release the memory when done.
  • Use use to release Fleece iterators.
  • Collection.save(DocumentModel) interprets a null conflict handler as last-write-wins. This fixes a NPE bug too.
  • FLValue.asString() should be marked @nullable per Jim. Fixed FleeceDeserialization to handle null by returning "" instead.

  • Ensure MutableDocument.setContentFromModel doesn't lose backing store

* Implemented Kotlin Serialization for Fleece

* Implemented serialization-based API extensions
- Collection.getDocumentAs(), save()
- Result.data()
- ResultSet.data()

* Implemented Collection.delete(DocumentModel)

* Allow null docID when saving new DocumentModel

* Fixes from code review (not all fixed)
- serializeToFleece() now returns a FLSliceResult not a ByteArray.
- Callers of the above use `use` to release the memory when done.
- Use `use` to release Fleece iterators.
- Collection.save(DocumentModel) interprets a null conflict handler as last-write-wins. This fixes a NPE bug too.

* FLValue.asString() should be marked @nullable per Jim.
Fixed FleeceDeserialization to handle null by returning "" instead.

* Ensure MutableDocument.setContentFromModel doesn't lose backing store
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

This is a release branch and commits are restricted.

Please confirm this PR is one of the following:

  • A response to a customer ask
  • A change per our security policy
  • A non-functional change (i.e. changes needed for building an older version)
  • A change that has been granted an exception (please comment)

@pasin

pasin commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

Ported the feature implementation for the release.

@pasin pasin requested a review from borrrden June 9, 2026 23:23
@pasin pasin merged commit 13d0cc6 into release/4.1 Jun 9, 2026
1 check passed
@pasin pasin deleted the kotlin-serialization-port branch June 9, 2026 23:51
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.

3 participants