datapilot-cli
Version:
Enterprise-grade streaming multi-format data analysis with comprehensive statistical insights and intelligent relationship detection - supports CSV, JSON, Excel, TSV, Parquet - memory-efficient, cross-platform
45 lines • 1.4 kB
TypeScript
/**
* JSON Parser Implementation
* Supports JSON arrays, objects, and JSONL (JSON Lines) format
*/
import type { ParsedRow, ParseOptions, FormatDetectionResult, FormatDetector } from './base/data-parser';
import { BaseParser } from './base/data-parser';
/**
* JSON Format Detector
*/
export declare class JSONDetector implements FormatDetector {
getSupportedExtensions(): string[];
getFormatName(): string;
detect(filePath: string): Promise<FormatDetectionResult>;
private readSample;
private tryParseJSON;
private tryParseJSONL;
private calculateNestingLevel;
}
/**
* JSON Parser Implementation
*/
export declare class JSONParser extends BaseParser {
private headers;
getSupportedExtensions(): string[];
getFormatName(): string;
detect(filePath: string): Promise<FormatDetectionResult>;
parse(filePath: string, options?: ParseOptions): AsyncIterableIterator<ParsedRow>;
private isJSONLFormat;
private parseJSON;
private parseJSONArray;
private parseJSONL;
private parseJSONObject;
private extractHeaders;
private convertToRowData;
private flattenObject;
/**
* Get detected headers for column mapping
*/
getHeaders(): string[];
}
/**
* Factory function to create JSON parser
*/
export declare function createJSONParser(options?: ParseOptions): JSONParser;
//# sourceMappingURL=json-parser.d.ts.map