json_mlake ยท API

json.types

Structs

JSONInput

struct JSONInput

Input structure for JSON data.

Implements Movable

Fields
data: List[UInt8]

__init__

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

JSONResult

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__

def __init__(out self)

total_result_size

def total_result_size(self) -> Int

Functions

is_structural_char

def is_structural_char(c: UInt8) -> Bool

Check if a character is a JSON structural character.

is_open_bracket

def is_open_bracket(c: UInt8) -> Bool

Check if character is an opening bracket.

is_close_bracket

def is_close_bracket(c: UInt8) -> Bool

Check if character is a closing bracket.

Aliases

comptime CHAR_OPEN_BRACE = UInt8(123)
comptime CHAR_CLOSE_BRACE = UInt8(125)
comptime CHAR_OPEN_BRACKET = UInt8(91)
comptime CHAR_CLOSE_BRACKET = UInt8(93)
comptime CHAR_COLON = UInt8(58)
comptime CHAR_COMMA = UInt8(44)
comptime CHAR_QUOTE = UInt8(34)
comptime CHAR_BACKSLASH = UInt8(92)
comptime CHAR_NEWLINE = UInt8(10)