# json.types

> A module of json_mlake's API.

## Structs

### `JSONInput`

```mojo
struct JSONInput
```

Input structure for JSON data.

Implements: `Movable`

Fields:

- `data: List[UInt8]`

#### `__init__`

```mojo
def __init__(out self, data: List[UInt8])
```

### `JSONResult`

```mojo
struct JSONResult
```

Result structure containing parsed JSON information.

- structural: Array containing byte positions of all JSON structural characters
- pair_pos: Array storing the closing structural character's index for each opening
- depth: Maximum nesting depth encountered in the parsed JSON

Implements: `Movable`

Fields:

- `structural: List[Int32]`
- `pair_pos: List[Int32]`
- `depth: Int`
- `file_size: Int`

#### `__init__`

```mojo
def __init__(out self)
```

#### `total_result_size`

```mojo
def total_result_size(self) -> Int
```

## Functions

### `is_structural_char`

```mojo
def is_structural_char(c: UInt8) -> Bool
```

Check if a character is a JSON structural character.

### `is_open_bracket`

```mojo
def is_open_bracket(c: UInt8) -> Bool
```

Check if character is an opening bracket.

### `is_close_bracket`

```mojo
def is_close_bracket(c: UInt8) -> Bool
```

Check if character is a closing bracket.

## Aliases

### `CHAR_OPEN_BRACE`

```mojo
comptime CHAR_OPEN_BRACE = UInt8(123)
```

### `CHAR_CLOSE_BRACE`

```mojo
comptime CHAR_CLOSE_BRACE = UInt8(125)
```

### `CHAR_OPEN_BRACKET`

```mojo
comptime CHAR_OPEN_BRACKET = UInt8(91)
```

### `CHAR_CLOSE_BRACKET`

```mojo
comptime CHAR_CLOSE_BRACKET = UInt8(93)
```

### `CHAR_COLON`

```mojo
comptime CHAR_COLON = UInt8(58)
```

### `CHAR_COMMA`

```mojo
comptime CHAR_COMMA = UInt8(44)
```

### `CHAR_QUOTE`

```mojo
comptime CHAR_QUOTE = UInt8(34)
```

### `CHAR_BACKSLASH`

```mojo
comptime CHAR_BACKSLASH = UInt8(92)
```

### `CHAR_NEWLINE`

```mojo
comptime CHAR_NEWLINE = UInt8(10)
```
