Package com.databricks.jdbc.api.impl

## Class ComplexDataTypeParser

- java.lang.Object
- - com.databricks.jdbc.api.impl.ComplexDataTypeParser

    public class ComplexDataTypeParser
    extends Object

Utility class for parsing complex data type objects (map, array, struct).

### Constructor Summary

Constructors
`ComplexDataTypeParser()` Constructor class for ComplexDataTypeParser.

### Method Summary

All Methods Instance Methods Concrete Methods
`com.fasterxml.jackson.databind.JsonNode` `parse​(String json)` Parses a JSON string into a JsonNode.
`List<Object>` `parseToArray​(com.fasterxml.jackson.databind.JsonNode node, String elementType)` Parses a JsonNode into an Array representation using the provided element type.
`Map<String,​Object>` `parseToMap​(String json, String metadata)` Parses a JSON string into a Map representation based on the provided metadata.
`Map<String,​Object>` `parseToStruct​(com.fasterxml.jackson.databind.JsonNode node, Map<String,​String> typeMap)` Parses a JsonNode into a Struct representation using the provided type map.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ComplexDataTypeParser

    public ComplexDataTypeParser()

Constructor class for ComplexDataTypeParser.

### Method Detail

#### parse

    public com.fasterxml.jackson.databind.JsonNode parse​(String json)

Parses a JSON string into a JsonNode.

Parameters:
  `json` - the JSON string to parse
Returns:
  the parsed JsonNode

#### parseToStruct

    public Map<String,​Object> parseToStruct​(com.fasterxml.jackson.databind.JsonNode node,
                                                  Map<String,​String> typeMap)

Parses a JsonNode into a Struct representation using the provided type map.

Parameters:
  `node` - the JsonNode to parse
  `typeMap` - the type map defining the structure of the Struct
Returns:
  a Map representing the Struct

#### parseToArray

    public List<Object> parseToArray​(com.fasterxml.jackson.databind.JsonNode node,
                                     String elementType)

Parses a JsonNode into an Array representation using the provided element type.

Parameters:
  `node` - the JsonNode to parse
  `elementType` - the type of elements in the array
Returns:
  a List representing the Array

#### parseToMap

    public Map<String,​Object> parseToMap​(String json,
                                               String metadata)

Parses a JSON string into a Map representation based on the provided metadata.

Parameters:
  `json` - the JSON string to parse
  `metadata` - the metadata defining the structure of the Map
Returns:
  a Map representing the parsed JSON