Skip to content

Project.fields fails to deserialize when API returns an empty array #441

Closed

Description

@peekhovsky

In version 1.38.0, Project.fields is a Map<String, Object>, but the Enterprise API returns an empty array when a project has no custom fields:

"fields": []

This causes a Jackson MismatchedInputException when deserializing ProjectResponseObject as ProjectSettings:

Cannot deserialize value of type `java.util.LinkedHashMap<java.lang.String,java.lang.Object>`
from Array value (token `JsonToken.START_ARRAY`)

Reference chain:

ProjectResponseObject["data"] -> ProjectSettings["fields"]

Expected: handle the empty array consistently with FileInfo.fields, using EmptyArrayToNullDeserializer as implemented in #436.

Activity

  1. added
    bug
    good first issue
    on Nov 16, 2026
  2. GeetikaChaudhary09 commented on Nov 16, 2026

    @GeetikaChaudhary09

    Hi! I'd like to work on this issue as my first open-source contribution.

    I'll investigate the existing EmptyArrayToNullDeserializer implementation used by FileInfo.fields, apply the same approach to Project.fields, and add a regression test for the empty array response.

    Please let me know if I can proceed.

    Thank you!

  3. peekhovsky commented on Nov 16, 2026

    @peekhovsky
    Author

    @GeetikaChaudhary09 @andrii-bodnar, could you please also check other similar fields and fix them if needed? Seems SourceString.fields, Concept.fields, Term.fields, User.fields have the same issue

  4. andrii-bodnar commented on Nov 16, 2026

    @andrii-bodnar
    Member

    @peekhovsky agreed, other *.fields probably have the same issue

  5. andrii-bodnar commented on Nov 16, 2026

    @andrii-bodnar
    Member

    @peekhovsky @GeetikaChaudhary09 I found a way to fix it once and for all in every possible case. See the linked PR.

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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions