IDL should differentiate when an optional field was not specified, or specified as 'null'

XMLWordPrintableJSON

    • Server Programmability
    • Security 2019-06-03
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently there is no way to tell if an optional field wasn't specified in the document, or was set to 'null'. E.g., if 'foo' is an optional field, then 'if (doc.getFoo())' will be false for the following two documents:

      {foo: null} 
      {}

      However, semantically, not specifying a field, and setting it to 'null' may have different meanings. So, the IDL should provide a mechanism to check whether an optional field didn't exist in the document, or its value is 'null'.

       

            Assignee:
            Unassigned
            Reporter:
            Anton Korshunov
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: