[**@rxap/components v19.1.0-dev.1**](../README.md)

***

[@rxap/components](../globals.md) / JsonViewerComponent

# Class: JsonViewerComponent

Defined in: [json-viewer/json-viewer.component.ts:45](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L45)

## Implements

- `OnInit`
- `OnChanges`

## Constructors

### new JsonViewerComponent()

> **new JsonViewerComponent**(`ignoredProperties`, `ignoredTypes`, `cdr`): [`JsonViewerComponent`](JsonViewerComponent.md)

Defined in: [json-viewer/json-viewer.component.ts:60](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L60)

#### Parameters

##### ignoredProperties

(`string` \| `RegExp` \| (`string` \| `RegExp`)[])[]

##### ignoredTypes

`any`[]

##### cdr

`ChangeDetectorRef`

#### Returns

[`JsonViewerComponent`](JsonViewerComponent.md)

## Properties

### cdr

> **cdr**: `ChangeDetectorRef`

Defined in: [json-viewer/json-viewer.component.ts:63](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L63)

***

### expanded

> **expanded**: `boolean` = `false`

Defined in: [json-viewer/json-viewer.component.ts:49](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L49)

***

### ignoredProperties

> **ignoredProperties**: (`string` \| `RegExp`)[] = `[]`

Defined in: [json-viewer/json-viewer.component.ts:53](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L53)

***

### ignoredTypes

> **ignoredTypes**: `any`[] = `[]`

Defined in: [json-viewer/json-viewer.component.ts:54](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L54)

***

### inspectValue

> **inspectValue**: `any`

Defined in: [json-viewer/json-viewer.component.ts:51](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L51)

***

### json

> **json**: `object` \| `Record`\<`string` \| `number` \| `symbol`, `unknown`\> = `{}`

Defined in: [json-viewer/json-viewer.component.ts:48](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L48)

***

### segments

> **segments**: [`Segment`](../interfaces/Segment.md)[] = `[]`

Defined in: [json-viewer/json-viewer.component.ts:58](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L58)

***

### subscriptions

> **subscriptions**: `Subscription`

Defined in: [json-viewer/json-viewer.component.ts:56](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L56)

## Methods

### buildSegments()

> **buildSegments**(`inspectValue`): `void`

Defined in: [json-viewer/json-viewer.component.ts:141](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L141)

#### Parameters

##### inspectValue

`any`

#### Returns

`void`

***

### cleanObject()

> **cleanObject**(`obj`, `stack`): `any`

Defined in: [json-viewer/json-viewer.component.ts:93](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L93)

#### Parameters

##### obj

`any`

##### stack

`any`[] = `[]`

#### Returns

`any`

***

### isExpandable()

> **isExpandable**(`segment`): `boolean`

Defined in: [json-viewer/json-viewer.component.ts:153](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L153)

#### Parameters

##### segment

[`Segment`](../interfaces/Segment.md)

#### Returns

`boolean`

***

### ngOnChanges()

> **ngOnChanges**(`changes`): `void`

Defined in: [json-viewer/json-viewer.component.ts:83](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L83)

A callback method that is invoked immediately after the
default change detector has checked data-bound properties
if at least one has changed, and before the view and content
children are checked.

#### Parameters

##### changes

`SimpleChanges`

The changed properties.

#### Returns

`void`

#### Implementation of

`OnChanges.ngOnChanges`

***

### ngOnInit()

> **ngOnInit**(): `void`

Defined in: [json-viewer/json-viewer.component.ts:79](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L79)

A callback method that is invoked immediately after the
default change detector has checked the directive's
data-bound properties for the first time,
and before any of the view or content children have been checked.
It is invoked only once when the directive is instantiated.

#### Returns

`void`

#### Implementation of

`OnInit.ngOnInit`

***

### setInspectValue()

> **setInspectValue**(`json`): `void`

Defined in: [json-viewer/json-viewer.component.ts:128](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L128)

#### Parameters

##### json

`any`

#### Returns

`void`

***

### toggle()

> **toggle**(`segment`): `void`

Defined in: [json-viewer/json-viewer.component.ts:157](https://gitlab.com/rxap/packages/-/blob/e3bb0ca983f56d75192a8e5eff1d3ecab00a3c63/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L157)

#### Parameters

##### segment

[`Segment`](../interfaces/Segment.md)

#### Returns

`void`
