# Class ComplexDataTypeParser

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

public class ComplexDataTypeParser extends Object

## Constructor Summary

Constructors
Constructor
Description
`ComplexDataTypeParser()`

## Method Summary

Modifier and Type
Method
Description
`String`
`formatComplexTypeString(String jsonString, String complexType, String typeMetadata)`
Formats a complex type JSON string into a consistent string format.
`String`
`formatMapString(String jsonString, String mapMetadata)`
Formats a map JSON string into the standard {key:value} format.
`DatabricksArray`
`parseJsonStringToDbArray(String json, String arrayMetadata)`
`DatabricksMap<String,Object>`
`parseJsonStringToDbMap(String json, String mapMetadata)`
`DatabricksStruct`
`parseJsonStringToDbStruct(String json, String structMetadata)`
`DatabricksArray`
`parseToArray(com.fasterxml.jackson.databind.JsonNode node, String arrayMetadata)`
`DatabricksMap<String,Object>`
`parseToMap(com.fasterxml.jackson.databind.JsonNode node, String mapMetadata)`
`DatabricksStruct`
`parseToStruct(com.fasterxml.jackson.databind.JsonNode node, String structMetadata)`

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

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

## Constructor Details

### ComplexDataTypeParser

public ComplexDataTypeParser()

## Method Details

### parseJsonStringToDbArray

public DatabricksArray parseJsonStringToDbArray(String json, String arrayMetadata) throws DatabricksParsingException

Throws:
  `DatabricksParsingException`

### parseJsonStringToDbMap

public DatabricksMap<String,Object> parseJsonStringToDbMap(String json, String mapMetadata) throws DatabricksParsingException

Throws:
  `DatabricksParsingException`

### parseJsonStringToDbStruct

public DatabricksStruct parseJsonStringToDbStruct(String json, String structMetadata) throws DatabricksParsingException

Throws:
  `DatabricksParsingException`

### parseToArray

public DatabricksArray parseToArray(com.fasterxml.jackson.databind.JsonNode node, String arrayMetadata) throws DatabricksParsingException

Throws:
  `DatabricksParsingException`

### parseToMap

public DatabricksMap<String,Object> parseToMap(com.fasterxml.jackson.databind.JsonNode node, String mapMetadata) throws DatabricksParsingException

Throws:
  `DatabricksParsingException`

### parseToStruct

public DatabricksStruct parseToStruct(com.fasterxml.jackson.databind.JsonNode node, String structMetadata) throws DatabricksParsingException

Throws:
  `DatabricksParsingException`

### formatComplexTypeString

public String formatComplexTypeString(String jsonString, String complexType, String typeMetadata)
Formats a complex type JSON string into a consistent string format. This is primarily used when complex datatype support is disabled.

Parameters:
  `jsonString` - The JSON string representation of the complex type
  `complexType` - The type of complex data (MAP, ARRAY, STRUCT)
  `typeMetadata` - The metadata for the type (e.g., "MAPinvalid input: '<'INT,INT>")
Returns:
  A consistently formatted string representation

### formatMapString

public String formatMapString(String jsonString, String mapMetadata)
Formats a map JSON string into the standard {key:value} format.

Parameters:
  `jsonString` - The JSON string representation of the map
  `mapMetadata` - The metadata for the map type (e.g., "MAPinvalid input: '<'INT,INT>")
Returns:
  A map string in the format {key:value,key:value}