UNPKG

@umbrelladocs/rdformat-validator

Version:

Validate and fix Reviewdog Diagnostic Format (RD Format) - A comprehensive library and CLI tool for validating JSON data against the Reviewdog Diagnostic Format specification

35 lines 1.21 kB
/** * Parser module for RDFormat Validator * Handles parsing JSON input from various sources */ import { Readable } from 'stream'; import { ParserOptions, ParserResult } from '../types/validation'; export declare class Parser { private options; constructor(options?: ParserOptions); /** * Parse JSON from a string input */ parseString(input: string): ParserResult; /** * Parse JSON from a file */ parseFile(filePath: string): Promise<ParserResult>; /** * Parse JSON from a readable stream */ parseStream(stream: Readable): Promise<ParserResult>; /** * Handle JSON parsing errors and extract useful information */ private handleParseError; /** * Convert character position to line and column numbers */ private getLineAndColumn; } export declare const defaultParser: Parser; export declare function parseString(input: string, options?: ParserOptions): ParserResult; export declare function parseFile(filePath: string, options?: ParserOptions): Promise<ParserResult>; export declare function parseStream(stream: Readable, options?: ParserOptions): Promise<ParserResult>; //# sourceMappingURL=index.d.ts.map