/**
 * Format conversion utilities
 * Provides functions for converting between different data formats
 */
import { EncodingError } from './text-encoder.js';
export { EncodingError };
export interface JsonToXmlOptions {
    rootElement?: string;
    indent?: string;
    includeDeclaration?: boolean;
}
export interface XmlToJsonOptions {
    preserveAttributes?: boolean;
    trimText?: boolean;
}
export interface CsvToJsonOptions {
    delimiter?: string;
    hasHeader?: boolean;
    trimValues?: boolean;
}
/**
 * Convert JSON to XML format
 * @param json - JSON object or string to convert
 * @param options - Conversion options
 * @returns XML string
 */
export declare function jsonToXml(json: unknown, options?: JsonToXmlOptions): string;
/**
 * Convert XML to JSON format
 * @param xml - XML string to convert
 * @param options - Conversion options
 * @returns JSON object
 */
export declare function xmlToJson(xml: string, options?: XmlToJsonOptions): Record<string, unknown>;
/**
 * Convert CSV to JSON format
 * @param csv - CSV string to convert
 * @param options - Conversion options
 * @returns Array of JSON objects
 */
export declare function csvToJson(csv: string, options?: CsvToJsonOptions): Record<string, string>[];
/**
 * Convert JSON to CSV format
 * @param json - Array of JSON objects or JSON string to convert
 * @param options - Conversion options
 * @returns CSV string
 */
export declare function jsonToCsv(json: Record<string, unknown>[] | string, options?: {
    delimiter?: string;
    includeHeader?: boolean;
}): string;
/**
 * Convert YAML-like format to JSON
 * Note: This is a simplified parser for basic YAML structures
 * @param yaml - YAML-like string to convert
 * @returns JSON object
 */
export declare function yamlToJson(yaml: string): Record<string, unknown>;
/**
 * Convert JSON to YAML-like format
 * @param json - JSON object or string to convert
 * @param indent - Indentation string (default: 2 spaces)
 * @returns YAML-like string
 */
export declare function jsonToYaml(json: unknown, indent?: string): string;
/**
 * Convert query string to JSON object
 * @param queryString - URL query string (with or without leading ?)
 * @returns JSON object
 */
export declare function queryStringToJson(queryString: string): Record<string, string | string[]>;
/**
 * Convert JSON object to query string
 * @param json - JSON object to convert
 * @param includeQuestionMark - Whether to include leading ? (default: false)
 * @returns Query string
 */
export declare function jsonToQueryString(json: Record<string, unknown>, includeQuestionMark?: boolean): string;
