Package Exports
- @jsonic/hoover
- @jsonic/hoover/dist/hoover.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jsonic/hoover) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@jsonic/hoover
A Jsonic syntax plugin that adds configurable block-delimited string parsing. Define custom string formats with start/end delimiters, escape sequences, and context-sensitive matching.
Available for TypeScript and Go.
![]() |
This open source module is sponsored and supported by Voxgig. |
|---|
Tutorials
Learn by building working examples from scratch.
- Parse triple-quoted strings (TypeScript)
- Parse triple-quoted strings (Go)
- Parse end-of-line values with comments (TypeScript)
- Parse end-of-line values with comments (Go)
How-to guides
Solve specific problems with hoover configuration.
- Control delimiter consumption (TypeScript) | (Go)
- Add escape sequences (TypeScript) | (Go)
- Restrict matching by rule context (TypeScript) | (Go)
Explanation
Understand how hoover works under the hood.
Reference
Complete API documentation for each language.
Quick example
Parse triple-quoted strings that preserve internal whitespace and newlines:
TypeScript
const j = Jsonic.make().use(Hoover, {
block: {
triplequote: {
start: { fixed: "'''" },
end: { fixed: "'''" },
}
}
})
j("{a: '''hello world'''}") // { a: 'hello world' }Go
j := jsonic.Make()
j.Use(hoover.Make(hoover.Options{
Block: map[string]*hoover.Block{
"triplequote": {
Start: hoover.StartSpec{Fixed: []string{"'''"}},
End: hoover.EndSpec{Fixed: []string{"'''"}},
},
},
}))
j.Parse("{a: '''hello world'''}") // map[string]any{"a": "hello world"}License
MIT. Copyright (c) Richard Rodger and other contributors.
