Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Adds @JsonProperty getter support in case classes #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rybosome
Copy link

Partially resolves #68

Adds support for @JsonProperty annotation on methods during serialization of case classes. If a method that takes no parameters is annotated with @JsonProperty("${name of property here}"), then its return value will be used rather than the native attribute. For instance:

case class Person(name: String) {

    @JsonProperty("name")
    def serializeName: String = name.reverse

}

@ghost
Copy link

ghost commented Oct 16, 2012

This annotation is a must have to avoid reserved word issues in scala. Please merge

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

case class @JsonProperty ignored
1 participant