Skip to content

Remove redundant objects wrapping on deserialization in streaming endpoints after polymorphism support #4234

Open

Description

@marcelomendoncasoares

After the merge of PR #4227, the deserialization of streamed data in endpoints now includes a redundant object wrapping structure. The PR introduced a __className__ field that contains the same information currently sent in the className field of the {"className": ..., "data": ...} wrapping structure. This results in unnecessary duplication during deserialization, adding overhead and complexity to the streaming mechanism. However, this structure can't be simply removed, as it is also used for primitive types, which do not have a __className__ field.

Activity

  1. added
    area: models
    on Nov 17, 2025
  2. moved this from Inbox 📫 to Backlog 🗂️ in Serverpod Frameworkson Nov 28, 2025
  3. added
    area: endpoints
    and removed
    area: models
    on Nov 28, 2025
  4. abdulawalarif commented on Jul 6, 2026

    @abdulawalarif
    Contributor

    Hi! I've reproduced this issue, and I would love to start working on a fix.
    Can anyone please assign this issue to me?
    @FXschwartz, @marcelomendoncasoares, @SandPod, @dkbast!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: endpoints

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions