Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • I ice
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 14
    • Issues 14
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse ProjectsEclipse Projects
  • The Eclipse Integrated Computational Environment
  • ice
  • Merge requests
  • !471

Use Builder for JSON Deserialization

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Eclipse Webmaster requested to merge github/fork/dbluhm/json-builder into next Sep 29, 2020
  • Overview 2
  • Commits 1
  • Changes 10

Created by: dbluhm

I found that the previous @JsonCreator method had some flaws in practice. For instance, if your JSON you're deserializing from omits any of the default fields of DataElements, deserialization would fail due to @NonNull being used. Removing that, you get nulls instead of the defaults declared on the DataElement.

Using the Builder form here, we get to use sparse JSON and have the defaults placed correctly when using sparse JSON.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/dbluhm/json-builder

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent