Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2489

Add to Enum<JsonMode>

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • BSON, JSON
    • None

    Description

      Currently ENum<JsonMode> has the Values 'STRICT' or 'SHELL' as a parameter value to be passed for example to JsonWriterSettings(JsonMode.SHELL)

      We need a 3rd option call it SIMPLE or NOTEXTENDED in which the bson extended json values are returned as raw values without using the bson extended json datatypes as in JsonMode.SHELL or returning a json document for the bson extended json datatypes as in JsonMode.STRICT

      For example a document with a field of type Long will render the following json
      JsonMode.SHELL -

      { "field1" : NumberLong("10000000000000") }

      JsonMode.STRICT - { "field1" :

      { "$numberLong" : "10000000000000" }

      JsonMode.SIMPLE -

      { "field1" : 10000000000000 }

      Currently, I am having to do regex substitution on a json returned using JsonMode.SHELL.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ensefik Edem Nsefik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: