JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 55
  • Score
    100M100P100Q93964F
  • License MIT

This plugin allows the [Jsonic](https://jsonic.senecajs.org) JSON parser to support string hoovering (unquoted internal spaces).

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.

npm version build Coverage Status Known Vulnerabilities DeepScan grade Maintainability

Voxgig This open source module is sponsored and supported by Voxgig.

Tutorials

Learn by building working examples from scratch.

How-to guides

Solve specific problems with hoover configuration.

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.