# @covalent/json-formatter

> Teradata UI Platform JSON Formatter Module

Latest version **0.9.1** (published 2016-11-23) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @covalent/json-formatter
pnpm add @covalent/json-formatter
yarn add @covalent/json-formatter
bun add @covalent/json-formatter
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.9.1 |
| Published | 2016-11-23 |
| First published | 2016-08-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >4.4 < 7 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2223 |
| Author | Teradata UX |
| Maintainers | emoralesb05, teradata |
| Keywords | angular, components, reusable, json, formatter, pretty |

## Links

- npm: https://www.npmjs.com/package/@covalent/json-formatter
- Repository: https://github.com/teradata/covalent
- Homepage: https://github.com/teradata/covalent#readme
- Issues: https://github.com/teradata/covalent/issues
- npm.io page: https://npm.io/package/@covalent/json-formatter

## Dependencies (1)

- [@covalent/core](https://npm.io/package/@covalent/core.md) 0.9.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.9.1 (latest) — 2016-11-23
- 0.9.0 — 2016-11-21
- 0.8.1 — 2016-10-16
- 0.8.0 — 2016-10-14
- 0.7.0 — 2016-09-15
- 0.6.0-exp1 — 2016-09-14
- 0.6.0 — 2016-08-19

## README

# td-json-formatter

`td-json-formatter` renders a javascript object in Json format the same way the chrome/firefox console would render it using `console.log()`.

Hovering on nodes will bring out a preview tooltip of the first 5 objects/properties of the node.

The tree is collapsable/expandable so you can navigate through its nodes.

## API Summary

Properties:

| Name | Type | Description |
| --- | --- | --- |
| `key?` | `string` | Tag to be displayed as root of formatted object.
| `data` | `any` | JS object to be formatted.
| `levelsOpen?` | `number` | Levels opened by default when JS object is formatted and rendered.

## Setup

Import the [CovalentJsonFormatterModule] using the forRoot() method in your NgModule:

```typescript
import { CovalentJsonFormatterModule } from '@covalent/json-formatter';
@NgModule({
  imports: [
    CovalentJsonFormatterModule.forRoot(),
    ...
  ],
  ...
})
export class MyModule {}
```

## Usage

Simply add the component and pass the object to be formatted as a [data] input.

Example for HTML usage:

```html
<td-json-formatter [data]="object" key="root" [levelsOpen]="1">
</td-json-formatter>
```

---
_Source: https://npm.io/package/@covalent/json-formatter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
