A lightweight parser for converting AWS Athena struct and array strings into native JavaScript objects. Current version 1.1.0 is stable with a simple API and no external dependencies. Unlike naive regex or manual parsing, it handles nested structs, arrays, and unescaped characters correctly. This is the only dedicated npm package for this specific Athena output format, filling a gap left by query wrappers like athena-express.
npm install athena-struct-parserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses an Athena struct string into a JavaScript object, demonstrating usage with athena-express results.
Ensure input string matches Athena's struct representation exactly, including braces and equals signs.
Wrap calls in try-catch or pre-validate input if data quality is uncertain.
Use the Athena struct format: '{foo=bar}' not '{"foo":"bar"}'.Use default import: import parseStruct from 'athena-struct-parser'.
Limit nesting depth or use iterative parsing (not available in this library); consider sampling or truncation.
No dependency data recorded yet.