An open API service indexing awesome lists of open source software.

https://github.com/blackglory/brave-json

🌿
https://github.com/blackglory/brave-json

browser esm library nodejs typescript

Last synced: 2 months ago
JSON representation

🌿

Awesome Lists containing this project

README

          

# brave-json
## Install
```sh
npm install --save brave-json
# or
yarn add brave-json
```

## API
### BraveJSON
```ts
interface IConverter {
toJSON(value: Raw): JSON
fromJSON(value: JSON): Raw
}

class BraveJSON {
static readonly DEFAULT_SYMBOL = '$brave-json'

constructor(
converter: IConverter
, options?: { symbol?: string = BraveJSON.DEFAULT_SYMBOL }
)

stringify(value: unknown, space?: string | number): string
parse(text: string): T
}
```