FasterXML / FasterXML/jackson-module-scala

"get" appearing in property names with 2.6.x

Open
#224 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Scala
Stars
506
Forks
138
Avg merge
3h 6m
Merged PRs (30d)
48

Description

Filed from discussion with @christophercurrie in #217.

Here's a possible pattern (not 100% sure). I think using `@JsonProperty` without a value is causing this. I've confirmed that the issue goes away when I don't register the Scala module.

I'm building JSON for a class named `Product`. `@JsonAutoDetect` is set up on `Surface` so nothing is autodetected so I have to whitelist properties with `@JsonProperty`.

``` java
@JsonAutoDetect(creatorVisibility = JsonAutoDetect.Visibility.NONE,
fieldVisibility = JsonAutoDetect.Visibility.NONE,
getterVisibility = JsonAutoDetect.Visibility.NONE,
isGetterVisibility = JsonAutoDetect.Visibility.NONE,
setterVisibility = JsonAutoDetect.Visibility.NONE)
public interface Surface { ... }

public abstract class AbstractSurface implements Surface { ... }

public class Product extends AbstractSurface implements Comparable { ... }
```

Some of my properties come from `AbstractSurface` and other come from `Product`, but I think that the ones that have the unexpected `get` prefix have `@JsonProperty` without a value.

Sorry, no test case right now but hopefully that points you in the right direction.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.