UNPKG

@blocktion/json-to-table

Version:

A powerful, modular React component for converting JSON data to navigable tables with advanced features like automatic column detection, theming, and sub-table navigation. Part of the Blocktion SaaS project ecosystem.

39 lines (38 loc) 986 B
export interface ProcessedData { raw: unknown[]; parsed: unknown[]; validated: unknown[]; analyzed: StructureAnalysis; metadata: DataMetadata; } export interface StructureAnalysis { isArray: boolean; isObject: boolean; arrayContentType?: "objects" | "mixed" | "primitives" | "empty" | "nulls"; objectKeys?: string[]; depth: number; sampleData: unknown[]; } export interface DataMetadata { totalRows: number; totalColumns: number; hasNestedData: boolean; maxDepth: number; warnings: string[]; errors: string[]; } export interface ValidationResult { isValid: boolean; errors: string[]; warnings: string[]; } export declare class DataProcessor { private static instance; static getInstance(): DataProcessor; processData(data: unknown[]): ProcessedData; private parseJsonStrings; private tryParseJSON; private validateData; private analyzeStructure; private generateMetadata; }