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

JSONBuilder/JSONSlurper: Option to Only Include NonNull values

    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

            People

              Unassigned Unassigned
              pascalschumacher Pascal Schumacher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: