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

Add to Enum<JsonMode>

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON, JSON
    • None

      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.

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

              Created:
              Updated:
              Resolved: