Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pageList and other EPUB collections must be serialized as JSON "compact collections" #185

Open
mickael-menu opened this issue Jul 22, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@mickael-menu
Copy link
Member

All the subcollections defined in the EPUB RWPM profile are supposed to be Compact Collections:

Compact Collection
A collection that contains one or more links, but doesn't contain any metadata or sub-collections.

But the current Kotlin toolkit serializes all subcollections as Full Collections, with an empty metadata object.

We can fix this by:

  1. Adding an PublicationCollection.isCompact property, to determine if a collection must be serialized as a simple list of Link objects (compact collection).
  2. When parsing a RWPM JSON, determine the value of isCompact automatically according to the parsed structure.
  3. When creating an in-memory model from the EPUB parser, set explicitly the isCompact property to true, when creating the subcollections.
@mickael-menu mickael-menu added the bug Something isn't working label Jul 22, 2021
@mickael-menu mickael-menu transferred this issue from readium/r2-shared-kotlin Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant