Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3630

Don't serialize unset/null fields (or allow toggling of such)

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0
    • Affects Version/s: None
    • Component/s: None

      I'm working on a project where I need to be able to disable the output of null or unset fields when my models are serialized to JSON.

      Right now mongoid insists on reproducing the schema in it's entirety, regardless of whether the database even has a value for a field.

            Assignee:
            Unassigned Unassigned
            Reporter:
            atrauzzi atrauzzi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: