{
  "classes": [
    {
      "constants": [
        {
          "name": "QUOTE_MINIMAL",
          "value": "0",
          "owner": "csv",
          "group_title": "Quote only when the field contains special characters.",
          "desc": ""
        },
        {
          "name": "QUOTE_ALL",
          "value": "1",
          "owner": "csv",
          "group_title": "Quote every field unconditionally.",
          "desc": ""
        },
        {
          "name": "QUOTE_NONNUMERIC",
          "value": "2",
          "owner": "csv",
          "group_title": "Quote non-numeric fields; on read, reject unquoted non-numeric in strict mode.",
          "desc": ""
        },
        {
          "name": "QUOTE_NONE",
          "value": "3",
          "owner": "csv",
          "group_title": "Never quote; use `escapechar` to protect special characters.",
          "desc": ""
        }
      ],
      "types": [
        {
          "lua_type": "type Dialect = {\n    delimiter: string?,\n    quotechar: string?,\n    escapechar: string?,\n    doublequote: boolean?,\n    quoting: number?,\n    lineterminator: string?,\n}",
          "name": "Dialect",
          "tags": [],
          "source": {
            "path": "",
            "line": 10
          },
          "fields": [
            {
              "lua_type": "delimiter: string?",
              "name": "delimiter",
              "desc": "Field separator (single byte). Default `\",\"`."
            },
            {
              "lua_type": "quotechar: string?",
              "name": "quotechar",
              "desc": "Character used to quote fields (single byte). Default `'\"'`."
            },
            {
              "lua_type": "escapechar: string?",
              "name": "escapechar",
              "desc": "Character used to escape special characters (single byte). Default `nil` (disabled)."
            },
            {
              "lua_type": "doublequote: boolean?",
              "name": "doublequote",
              "desc": "Whether a quote character inside a quoted field is escaped by doubling it. Default `true`."
            },
            {
              "lua_type": "quoting: number?",
              "name": "quoting",
              "desc": "One of the `csv.QUOTE_*` constants controlling quoting behaviour. Default `QUOTE_MINIMAL`."
            },
            {
              "lua_type": "lineterminator: string?",
              "name": "lineterminator",
              "desc": "String appended after each row during generation. Default `\"\\r\\n\"`."
            }
          ],
          "desc": "Core format description shared between parsing and generation.\nDialect presets contain only these fields -- parse- and generate-specific\noptions live on their respective option types.\n"
        },
        {
          "lua_type": "type ParseOptions = {\n    dialect: (string | Dialect)?,\n    skipinitialspace: boolean?,\n    strict: boolean?,\n    comment: string?,\n    trimfields: boolean?,\n    maxfieldsize: number?,\n    skipblanklines: boolean?,\n    delimiter: string?,\n    quotechar: string?,\n    escapechar: string?,\n    doublequote: boolean?,\n    quoting: number?,\n    lineterminator: string?,\n}",
          "name": "ParseOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 29
          },
          "fields": [
            {
              "lua_type": "dialect: (string | Dialect)?",
              "name": "dialect",
              "desc": "Base dialect -- a registered name or an inline `Dialect` table."
            },
            {
              "lua_type": "skipinitialspace: boolean?",
              "name": "skipinitialspace",
              "desc": "Skip whitespace immediately following the delimiter. Default `false`."
            },
            {
              "lua_type": "strict: boolean?",
              "name": "strict",
              "desc": "Error on malformed input (bare quotes, unterminated fields, etc.). Default `false`."
            },
            {
              "lua_type": "comment: string?",
              "name": "comment",
              "desc": "Single-byte prefix that marks an entire line as a comment. Default `nil` (disabled)."
            },
            {
              "lua_type": "trimfields: boolean?",
              "name": "trimfields",
              "desc": "Trim leading/trailing whitespace from unquoted fields. Default `false`."
            },
            {
              "lua_type": "maxfieldsize: number?",
              "name": "maxfieldsize",
              "desc": "Maximum number of characters allowed per field. Default `nil` (unlimited)."
            },
            {
              "lua_type": "skipblanklines: boolean?",
              "name": "skipblanklines",
              "desc": "Discard rows that consist of a single empty field. Default `false`."
            },
            {
              "lua_type": "delimiter: string?",
              "name": "delimiter",
              "desc": "Field separator (single byte). Default `\",\"`."
            },
            {
              "lua_type": "quotechar: string?",
              "name": "quotechar",
              "desc": "Character used to quote fields (single byte). Default `'\"'`."
            },
            {
              "lua_type": "escapechar: string?",
              "name": "escapechar",
              "desc": "Character used to escape special characters (single byte). Default `nil` (disabled)."
            },
            {
              "lua_type": "doublequote: boolean?",
              "name": "doublequote",
              "desc": "Whether a quote character inside a quoted field is escaped by doubling it. Default `true`."
            },
            {
              "lua_type": "quoting: number?",
              "name": "quoting",
              "desc": "One of the `csv.QUOTE_*` constants controlling quoting behaviour. Default `QUOTE_MINIMAL`."
            },
            {
              "lua_type": "lineterminator: string?",
              "name": "lineterminator",
              "desc": "String appended after each row during generation. Default `\"\\r\\n\"`."
            }
          ],
          "desc": "Options for `csv.parse`. Inherits all `Dialect` fields as per-call overrides;\nresolution order is: option field > dialect field > hard default.\n"
        },
        {
          "lua_type": "type GenerateOptions = {\n    dialect: (string | Dialect)?,\n    delimiter: string?,\n    quotechar: string?,\n    escapechar: string?,\n    doublequote: boolean?,\n    quoting: number?,\n    lineterminator: string?,\n}",
          "name": "GenerateOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 47
          },
          "fields": [
            {
              "lua_type": "dialect: (string | Dialect)?",
              "name": "dialect",
              "desc": "Base dialect -- a registered name or an inline `Dialect` table."
            },
            {
              "lua_type": "delimiter: string?",
              "name": "delimiter",
              "desc": "Field separator (single byte). Default `\",\"`."
            },
            {
              "lua_type": "quotechar: string?",
              "name": "quotechar",
              "desc": "Character used to quote fields (single byte). Default `'\"'`."
            },
            {
              "lua_type": "escapechar: string?",
              "name": "escapechar",
              "desc": "Character used to escape special characters (single byte). Default `nil` (disabled)."
            },
            {
              "lua_type": "doublequote: boolean?",
              "name": "doublequote",
              "desc": "Whether a quote character inside a quoted field is escaped by doubling it. Default `true`."
            },
            {
              "lua_type": "quoting: number?",
              "name": "quoting",
              "desc": "One of the `csv.QUOTE_*` constants controlling quoting behaviour. Default `QUOTE_MINIMAL`."
            },
            {
              "lua_type": "lineterminator: string?",
              "name": "lineterminator",
              "desc": "String appended after each row during generation. Default `\"\\r\\n\"`."
            }
          ],
          "desc": "Options for `csv.generate`. Inherits all `Dialect` fields as per-call overrides."
        },
        {
          "lua_type": "type DictParseOptions = {\n    columns: { string }?,\n    restval: string?,\n    dialect: (string | Dialect)?,\n    skipinitialspace: boolean?,\n    strict: boolean?,\n    comment: string?,\n    trimfields: boolean?,\n    maxfieldsize: number?,\n    skipblanklines: boolean?,\n    delimiter: string?,\n    quotechar: string?,\n    escapechar: string?,\n    doublequote: boolean?,\n    quoting: number?,\n    lineterminator: string?,\n}",
          "name": "DictParseOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 53
          },
          "fields": [
            {
              "lua_type": "columns: { string }?",
              "name": "columns",
              "desc": "Explicit column names. When set, the first row is treated as data, not a header."
            },
            {
              "lua_type": "restval: string?",
              "name": "restval",
              "desc": "Value used for missing fields when a row is shorter than the header. Default `\"\"`."
            },
            {
              "lua_type": "dialect: (string | Dialect)?",
              "name": "dialect",
              "desc": "Base dialect -- a registered name or an inline `Dialect` table."
            },
            {
              "lua_type": "skipinitialspace: boolean?",
              "name": "skipinitialspace",
              "desc": "Skip whitespace immediately following the delimiter. Default `false`."
            },
            {
              "lua_type": "strict: boolean?",
              "name": "strict",
              "desc": "Error on malformed input (bare quotes, unterminated fields, etc.). Default `false`."
            },
            {
              "lua_type": "comment: string?",
              "name": "comment",
              "desc": "Single-byte prefix that marks an entire line as a comment. Default `nil` (disabled)."
            },
            {
              "lua_type": "trimfields: boolean?",
              "name": "trimfields",
              "desc": "Trim leading/trailing whitespace from unquoted fields. Default `false`."
            },
            {
              "lua_type": "maxfieldsize: number?",
              "name": "maxfieldsize",
              "desc": "Maximum number of characters allowed per field. Default `nil` (unlimited)."
            },
            {
              "lua_type": "skipblanklines: boolean?",
              "name": "skipblanklines",
              "desc": "Discard rows that consist of a single empty field. Default `false`."
            },
            {
              "lua_type": "delimiter: string?",
              "name": "delimiter",
              "desc": "Field separator (single byte). Default `\",\"`."
            },
            {
              "lua_type": "quotechar: string?",
              "name": "quotechar",
              "desc": "Character used to quote fields (single byte). Default `'\"'`."
            },
            {
              "lua_type": "escapechar: string?",
              "name": "escapechar",
              "desc": "Character used to escape special characters (single byte). Default `nil` (disabled)."
            },
            {
              "lua_type": "doublequote: boolean?",
              "name": "doublequote",
              "desc": "Whether a quote character inside a quoted field is escaped by doubling it. Default `true`."
            },
            {
              "lua_type": "quoting: number?",
              "name": "quoting",
              "desc": "One of the `csv.QUOTE_*` constants controlling quoting behaviour. Default `QUOTE_MINIMAL`."
            },
            {
              "lua_type": "lineterminator: string?",
              "name": "lineterminator",
              "desc": "String appended after each row during generation. Default `\"\\r\\n\"`."
            }
          ],
          "desc": "Additional options for `csv.parseDict`, on top of `ParseOptions`."
        },
        {
          "lua_type": "type DictGenerateOptions = {\n    restval: string?,\n    writeheader: boolean?,\n    dialect: (string | Dialect)?,\n    delimiter: string?,\n    quotechar: string?,\n    escapechar: string?,\n    doublequote: boolean?,\n    quoting: number?,\n    lineterminator: string?,\n}",
          "name": "DictGenerateOptions",
          "tags": [],
          "source": {
            "path": "",
            "line": 61
          },
          "fields": [
            {
              "lua_type": "restval: string?",
              "name": "restval",
              "desc": "Value used for missing keys when a dict row lacks a field name. Default `\"\"`."
            },
            {
              "lua_type": "writeheader: boolean?",
              "name": "writeheader",
              "desc": "Whether to emit a header row from the field names. Default `true`."
            },
            {
              "lua_type": "dialect: (string | Dialect)?",
              "name": "dialect",
              "desc": "Base dialect -- a registered name or an inline `Dialect` table."
            },
            {
              "lua_type": "delimiter: string?",
              "name": "delimiter",
              "desc": "Field separator (single byte). Default `\",\"`."
            },
            {
              "lua_type": "quotechar: string?",
              "name": "quotechar",
              "desc": "Character used to quote fields (single byte). Default `'\"'`."
            },
            {
              "lua_type": "escapechar: string?",
              "name": "escapechar",
              "desc": "Character used to escape special characters (single byte). Default `nil` (disabled)."
            },
            {
              "lua_type": "doublequote: boolean?",
              "name": "doublequote",
              "desc": "Whether a quote character inside a quoted field is escaped by doubling it. Default `true`."
            },
            {
              "lua_type": "quoting: number?",
              "name": "quoting",
              "desc": "One of the `csv.QUOTE_*` constants controlling quoting behaviour. Default `QUOTE_MINIMAL`."
            },
            {
              "lua_type": "lineterminator: string?",
              "name": "lineterminator",
              "desc": "String appended after each row during generation. Default `\"\\r\\n\"`."
            }
          ],
          "desc": "Additional options for `csv.generateDict`, on top of `GenerateOptions`."
        },
        {
          "lua_type": "type SniffResult = {\n    delimiter: string,\n    quotechar: string?,\n    doublequote: boolean?,\n}",
          "name": "SniffResult",
          "tags": [],
          "source": {
            "path": "",
            "line": 69
          },
          "fields": [
            {
              "lua_type": "delimiter: string",
              "name": "delimiter",
              "desc": "The best-guess field delimiter."
            },
            {
              "lua_type": "quotechar: string?",
              "name": "quotechar",
              "desc": "The detected quote character, or `nil` if none was found."
            },
            {
              "lua_type": "doublequote: boolean?",
              "name": "doublequote",
              "desc": "Whether doubled-quote escaping is assumed."
            }
          ],
          "desc": "Result returned by `csv.sniff`."
        }
      ],
      "name": "@eryx/encoding/csv",
      "tags": [],
      "functions": [
        {
          "source": {
            "path": "",
            "line": 226
          },
          "is_method": false,
          "signature": "csv.parse(\n    input: string,  -- -- The raw CSV text to parse.\n    opts: ParseOptions?  -- -- Parsing options. See `ParseOptions` for available fields.\n) → (\n    { { string } }  -- The parsed rows. \n)",
          "owner": "csv",
          "desc": "Parse a CSV/TSV string into a list of rows.\nEach row is a list of string field values. Automatically strips a leading\nUTF-8 BOM and normalises all line-ending styles.",
          "tags": [],
          "name": "parse",
          "return_str": "{ { string } }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ { string } }",
              "desc": "The parsed rows. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "input",
              "desc": "-- The raw CSV text to parse."
            },
            {
              "lua_type": "ParseOptions?",
              "name": "opts",
              "desc": "-- Parsing options. See `ParseOptions` for available fields."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 524
          },
          "is_method": false,
          "signature": "csv.generate(\n    rows: { { string } },  -- -- List of rows, where each row is a list of string field values.\n    opts: GenerateOptions?  -- -- Generation options. See `GenerateOptions` for available fields.\n) → (\n    string  -- The serialized CSV text. \n)",
          "owner": "csv",
          "desc": "Serialize a list of rows into a CSV/TSV string.\nA line terminator is appended after every row, including the last\n(matching Python `csv.writer` behaviour).",
          "tags": [],
          "name": "generate",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": "The serialized CSV text. "
            }
          ],
          "params": [
            {
              "lua_type": "{ { string } }",
              "name": "rows",
              "desc": "-- List of rows, where each row is a list of string field values."
            },
            {
              "lua_type": "GenerateOptions?",
              "name": "opts",
              "desc": "-- Generation options. See `GenerateOptions` for available fields."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 576
          },
          "is_method": false,
          "signature": "csv.parseDict(\n    input: string,  -- -- The raw CSV text to parse.\n    opts: DictParseOptions?  -- -- Parsing options. See `DictParseOptions` for available fields.\n) → (\n    { { [string]: string } },  -- The parsed rows as dictionaries.\n    { string }  -- The resolved field names. \n)",
          "owner": "csv",
          "desc": "Parse CSV input and return each row as a dictionary keyed by field name.\nField names come from the first data row unless `opts.columns` is set,\nin which case the first row is treated as data. Missing fields are filled\nwith `restval`; extra fields beyond the header are discarded.",
          "tags": [],
          "name": "parseDict",
          "return_str": "({ { [string]: string } }, { string })",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ { [string]: string } }",
              "desc": "The parsed rows as dictionaries."
            },
            {
              "lua_type": "{ string }",
              "desc": "The resolved field names. "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "input",
              "desc": "-- The raw CSV text to parse."
            },
            {
              "lua_type": "DictParseOptions?",
              "name": "opts",
              "desc": "-- Parsing options. See `DictParseOptions` for available fields."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 620
          },
          "is_method": false,
          "signature": "csv.generateDict(\n    rows: { { [string]: string } },  -- -- List of dictionary rows to serialize.\n    fieldnames: { string },  -- -- Ordered column names that control output column order.\n    opts: DictGenerateOptions?  -- -- Generation options. See `DictGenerateOptions` for available fields.\n) → (\n    string  -- The serialized CSV text. \n)",
          "owner": "csv",
          "desc": "Serialize dictionary rows into CSV, optionally prepending a header row\nbuilt from `fieldnames`. Each row is a table keyed by field name.",
          "tags": [],
          "name": "generateDict",
          "return_str": "string",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "string",
              "desc": "The serialized CSV text. "
            }
          ],
          "params": [
            {
              "lua_type": "{ { [string]: string } }",
              "name": "rows",
              "desc": "-- List of dictionary rows to serialize."
            },
            {
              "lua_type": "{ string }",
              "name": "fieldnames",
              "desc": "-- Ordered column names that control output column order."
            },
            {
              "lua_type": "DictGenerateOptions?",
              "name": "opts",
              "desc": "-- Generation options. See `DictGenerateOptions` for available fields."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 650
          },
          "is_method": false,
          "signature": "csv.registerDialect(\n    name: string,  -- -- The dialect name to register under.\n    dialect: Dialect  -- -- The dialect definition. \n) → ()",
          "owner": "csv",
          "desc": "Register (or overwrite) a named dialect.",
          "tags": [],
          "name": "registerDialect",
          "return_str": "",
          "function_type": "Function",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "-- The dialect name to register under."
            },
            {
              "lua_type": "Dialect",
              "name": "dialect",
              "desc": "-- The dialect definition. "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 659
          },
          "is_method": false,
          "signature": "csv.getDialect(\n    name: string  -- -- The dialect name to look up.\n) → (\n      -- Dialect? \n)",
          "owner": "csv",
          "desc": "Retrieve a named dialect table, or `nil` if not registered.",
          "tags": [],
          "name": "getDialect",
          "return_str": "Dialect?",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "Dialect?",
              "desc": "Dialect? "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "-- The dialect name to look up."
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 667
          },
          "is_method": false,
          "signature": "csv.unregisterDialect(\n    name: string  -- -- The dialect name to remove. \n) → ()",
          "owner": "csv",
          "desc": "Remove a named dialect. No-op if the name is not registered.",
          "tags": [],
          "name": "unregisterDialect",
          "return_str": "",
          "function_type": "Function",
          "returns": [],
          "params": [
            {
              "lua_type": "string",
              "name": "name",
              "desc": "-- The dialect name to remove. "
            }
          ]
        },
        {
          "source": {
            "path": "",
            "line": 675
          },
          "is_method": false,
          "signature": "csv.listDialects() → (\n      -- { string } \n)",
          "owner": "csv",
          "desc": "Return a sorted list of all registered dialect names.",
          "tags": [],
          "name": "listDialects",
          "return_str": "{ string }",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "{ string }",
              "desc": "{ string } "
            }
          ],
          "params": []
        },
        {
          "source": {
            "path": "",
            "line": 696
          },
          "is_method": false,
          "signature": "csv.sniff(\n    input: string,  -- -- The raw CSV text to analyse.\n    candidates: { string }?  -- -- Delimiter characters to consider. Defaults to `{ \",\", \"\\t\", \"|\", \";\", \":\" }`.\n) → (\n      -- SniffResult \n)",
          "owner": "csv",
          "desc": "Examine the first 20 non-empty lines of `input` and return a best-guess\ndialect. The heuristic prefers the delimiter that produces a consistent\ncolumn count across all sample lines, breaking ties by column count.",
          "tags": [],
          "name": "sniff",
          "return_str": "SniffResult",
          "function_type": "Function",
          "returns": [
            {
              "lua_type": "SniffResult",
              "desc": "SniffResult "
            }
          ],
          "params": [
            {
              "lua_type": "string",
              "name": "input",
              "desc": "-- The raw CSV text to analyse."
            },
            {
              "lua_type": "{ string }?",
              "name": "candidates",
              "desc": "-- Delimiter characters to consider. Defaults to `{ \",\", \"\\t\", \"|\", \";\", \":\" }`."
            }
          ]
        }
      ],
      "properties": [],
      "source": {
        "path": "",
        "line": 0
      },
      "desc": "CSV reading and writing utilities.\n"
    }
  ]
}