Skip to content

NoSuchPropertyError on higher jackson versions #8

Closed

Description

@JayJayOne

The PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES on line:

objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES);

causes a NoSuchPropertyError on the latest jackson versions. I would've made a PR but due to the fact that all PropertyNamingStrategy items are deprecated i wasn't quite sure how to approach the issue.

Thanks in advance
J.

Activity

  1. vladimanaev commented on Feb 1, 2024

    @vladimanaev
    Collaborator

    I think we can add a flag similar to what we did with READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE
    and rename to higher version enum name (I remember it has a new name or so)

    if(!serializationConfig.shouldDisableReadUnknownEnumValuesAsDefaultValue()) {
    ...
    }
    

    Which Jackson version are you using?

  2. JayJayOne commented on Feb 2, 2024

    @JayJayOne
    Author

    I've downgraded since, but i think it was 2.16.something. I wanted to upgrade my projects framework and this was part of it. That's why i'm not 100% sure which version it was.

  3. vladimanaev commented on Feb 2, 2024

    @vladimanaev
    Collaborator

    @JayJayOne see #9 I am going to add ability to switch to SNAKE_CASE via SerializationConfig flag.
    If you still having issues let me know since PropertyNamingStrategy.SNAKE_CASE is deprecated also from 2.12 and the new way is PropertyNamingStrategies.SNAKE_CASE for which we will need to upgrade jackson version of SDK.

  4. JayJayOne commented on Feb 8, 2024

    @JayJayOne
    Author

    @vladimanaev Sorry for taking some time to respond i just got back working on that project. Could you update the dependency in the backstage-api-java-client? I'm actually using this library and since there hasn't been any update yet the problem still persists.
    Thanks J.

  5. vladimanaev commented on Feb 9, 2024

    @vladimanaev
    Collaborator

    @JayJayOne released as part of 1.1.8 of Backstage repository

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions