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. |
|---|
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)
Solve specific problems with hoover configuration.
- Control delimiter consumption (TypeScript) | (Go)
- Add escape sequences (TypeScript) | (Go)
- Restrict matching by rule context (TypeScript) | (Go)
Understand how hoover works under the hood.
Complete API documentation for each language.
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"}MIT. Copyright (c) Richard Rodger and other contributors.
