jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Jackson JSON Processor
  • JACKSON-89

Improve handling of @JsonIgnore (for deserialization) to add ignored property as known but ignored

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.4
  • Component/s: None
  • Labels:
    None

Description

Currently @JsonIgnore simply prevents associated method (getter, setter etc) from being recognized as one. But in context of deserialization it would be useful to change this so that "ignoral" would apply to implied property, not just method: and if there is no other relevant getter/setter for the property, that property would be recognized but ignored if encountered on input to bind.

The main use case is to avoid binding sub-trees: for example, with class like:

class Bean {
public void setA(int a) { ...}

@JsonIgnore public void setDummy(HeavyBean b) { ... }
}

input would be allowed to contain member "dummy" for the bean; and if so, it would be skipped without problems.
Currently code like above would result in an unexception due to unknown property "dummy". This seems unnecessary.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Tatu Saloranta added a comment - 21/Apr/09 12:31 AM

Actually, given timing of things it seems better to defer this after 1.0 release, to get that out the door now. Will re-visit for 1.1.

Show
Tatu Saloranta added a comment - 21/Apr/09 12:31 AM Actually, given timing of things it seems better to defer this after 1.0 release, to get that out the door now. Will re-visit for 1.1.
Hide
Permalink
Tatu Saloranta added a comment - 08/Nov/09 3:18 PM

Can add in 1.4 along with changes needed to support @JsonIgnoreProperties.

Show
Tatu Saloranta added a comment - 08/Nov/09 3:18 PM Can add in 1.4 along with changes needed to support @JsonIgnoreProperties.
Hide
Permalink
Tatu Saloranta added a comment - 10/Nov/09 1:08 AM

Implemented: now field and setter-backed properties that are ignored using @JsonIgnore will be skipped by deserializer without exception.

Show
Tatu Saloranta added a comment - 10/Nov/09 1:08 AM Implemented: now field and setter-backed properties that are ignored using @JsonIgnore will be skipped by deserializer without exception.
Hide
Permalink
Tatu Saloranta added a comment - 14/Feb/10 4:16 PM

Included in 1.4.0

Show
Tatu Saloranta added a comment - 14/Feb/10 4:16 PM Included in 1.4.0

People

  • Assignee:
    Tatu Saloranta
    Reporter:
    Tatu Saloranta
Vote (0)
Watch (0)

Dates

  • Created:
    30/Mar/09 3:39 PM
    Updated:
    14/Feb/10 4:16 PM
    Resolved:
    10/Nov/09 1:08 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.