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

# Class: JsonViewerComponent

Defined in: [json-viewer/json-viewer.component.ts:42](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L42)

## Implements

- `OnInit`
- `OnChanges`

## Constructors

### new JsonViewerComponent()

> **new JsonViewerComponent**(`ignoredProperties`, `ignoredTypes`, `cdr`): [`JsonViewerComponent`](../wiki/Class.JsonViewerComponent)

Defined in: [json-viewer/json-viewer.component.ts:57](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L57)

#### Parameters

##### ignoredProperties

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

##### ignoredTypes

`any`[]

##### cdr

`ChangeDetectorRef`

#### Returns

[`JsonViewerComponent`](../wiki/Class.JsonViewerComponent)

## Properties

### cdr

> **cdr**: `ChangeDetectorRef`

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

***

### expanded

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

Defined in: [json-viewer/json-viewer.component.ts:46](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L46)

***

### ignoredProperties

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

Defined in: [json-viewer/json-viewer.component.ts:50](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L50)

***

### ignoredTypes

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

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

***

### inspectValue

> **inspectValue**: `any`

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

***

### json

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

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

***

### segments

> **segments**: [`Segment`](../wiki/Interface.Segment)[] = `[]`

Defined in: [json-viewer/json-viewer.component.ts:55](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L55)

***

### subscriptions

> **subscriptions**: `Subscription`

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

## Methods

### buildSegments()

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

Defined in: [json-viewer/json-viewer.component.ts:138](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L138)

#### Parameters

##### inspectValue

`any`

#### Returns

`void`

***

### cleanObject()

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

Defined in: [json-viewer/json-viewer.component.ts:90](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L90)

#### Parameters

##### obj

`any`

##### stack

`any`[] = `[]`

#### Returns

`any`

***

### isExpandable()

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

Defined in: [json-viewer/json-viewer.component.ts:150](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L150)

#### Parameters

##### segment

[`Segment`](../wiki/Interface.Segment)

#### Returns

`boolean`

***

### ngOnChanges()

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

Defined in: [json-viewer/json-viewer.component.ts:80](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L80)

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:76](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L76)

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:125](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L125)

#### Parameters

##### json

`any`

#### Returns

`void`

***

### toggle()

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

Defined in: [json-viewer/json-viewer.component.ts:154](https://gitlab.com/rxap/packages/-/blob/753c877fe1a5c2fcfa737310f6e99fd1371f9b4d/packages/angular/components/src/lib/json-viewer/json-viewer.component.ts#L154)

#### Parameters

##### segment

[`Segment`](../wiki/Interface.Segment)

#### Returns

`void`
