Uploaded image for project: 'Spark Connector'
  1. Spark Connector
  2. SPARK-405

Add convertJson.nestedValuesOnly configuration

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 10.2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Needed
    • Hide

      1. What would you like to communicate to the user about this feature?

      Added support to only convert strings that could be Json Objects or Arrays.
      This is useful for processing extended Json, as previously numeric looking strings were automatically converted.

      Updated config: convertJson
      Now accepts: false, any, objectOrArrayOnly
      Note: convertJson=true is now deprecated in favor of any

      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      Examples:

      convertJson=any
      "{a: 1}"    => {a: 1}
      "[1, 2, 3]" => [1, 2, 3]
      "true"      => true
      "0122345"   => 12345
      "{a:b:c}"   => "{a:b:c}"
      
      convertJson=objectOrArrayOnly
      
      "{a: 1}"    => {a: 1}
      "[1, 2, 3]" => [1, 2, 3]
      "true"      => "true"
      "0122345"   => "012345"
      "{a:b:c}"   => "{a:b:c}"
      

      3. Which versions of the driver/connector does this apply to?
      10.2.0

      Show
      1. What would you like to communicate to the user about this feature? Added support to only convert strings that could be Json Objects or Arrays. This is useful for processing extended Json, as previously numeric looking strings were automatically converted. Updated config: convertJson Now accepts: false , any , objectOrArrayOnly Note: convertJson=true is now deprecated in favor of any 2. Would you like the user to see examples of the syntax and/or executable code and its output? Examples: convertJson=any "{a: 1}" => {a: 1} "[1, 2, 3]" => [1, 2, 3] " true " => true "0122345" => 12345 "{a:b:c}" => "{a:b:c}" convertJson=objectOrArrayOnly "{a: 1}" => {a: 1} "[1, 2, 3]" => [1, 2, 3] " true " => " true " "0122345" => "012345" "{a:b:c}" => "{a:b:c}" 3. Which versions of the driver/connector does this apply to? 10.2.0

      Added support to only convert strings that could be Json Objects or Arrays.
      This is useful for processing extended Json, as previously numeric looking strings were automatically converted.

      Updated config: convertJson
      Now accepts: false, any, objectOrArrayOnly

      Examples:

      convertJson=any
      "{a: 1}"    => {a: 1}
      "[1, 2, 3]" => [1, 2, 3]
      "true"      => true
      "0122345"   => 12345
      "{a:b:c}"   => "{a:b:c}"
      
      convertJson=objectOrArrayOnly
      
      "{a: 1}"    => {a: 1}
      "[1, 2, 3]" => [1, 2, 3]
      "true"      => "true"
      "0122345"   => "012345"
      "{a:b:c}"   => "{a:b:c}"
      

      Note: convertJson=true is now deprecated in favor of any

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: