Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7780

JSONBuilder/JSONSlurper: Option to Only Include NonNull values

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • JSON
    • None

    Description

      requested on the mailing list, by Gerald Wiltse:

      I just found this article which describes the problem perfectly and there are several good workarounds.

      http://stackoverflow.com/questions/14749817/exclude-null-values-using-jsonbuilder-in-groovy

      Apparently, it's a native feature of Jackson, which makes me think it's probably available in lots of JSON API's.

      Any chance this feature could get on the roadmap for JSON Builder (and slurper for that matter)?

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            pascalschumacher Pascal Schumacher

            Dates

              Created:
              Updated:

              Issue deployment