# Class JsonViewerComponent

#### Implements

- OnInit
- OnChanges

- Defined in lib/json-viewer/json-viewer.component.ts:43

#####
Index

### Constructors

constructor

### Properties

cdr
expanded
ignoredProperties
ignoredTypes
inspectValue
json
segments
subscriptions

### Methods

buildSegments
cleanObject
isExpandable
ngOnChanges
ngOnInit
parseKeyValue
setInspectValue
toggle

## Constructors

### constructor

- new JsonViewerComponent(ignoredProperties, ignoredTypes, cdr): JsonViewerComponent

- #### Parameters

  - ignoredProperties: (string | RegExp | (string | RegExp)[])[]
  - ignoredTypes: any[]
  - cdr: ChangeDetectorRef

  #### Returns JsonViewerComponent

  - Defined in lib/json-viewer/json-viewer.component.ts:58

## Properties

### cdr

cdr: ChangeDetectorRef

- Defined in lib/json-viewer/json-viewer.component.ts:61

### expanded

expanded: boolean = false

- Defined in lib/json-viewer/json-viewer.component.ts:47

### ignoredProperties

ignoredProperties: (string | RegExp)[] = []

- Defined in lib/json-viewer/json-viewer.component.ts:51

### ignoredTypes

ignoredTypes: any[] = []

- Defined in lib/json-viewer/json-viewer.component.ts:52

### inspectValue

inspectValue: any

- Defined in lib/json-viewer/json-viewer.component.ts:49

### json

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

- Defined in lib/json-viewer/json-viewer.component.ts:46

### segments

segments: Segment[] = []

- Defined in lib/json-viewer/json-viewer.component.ts:56

### subscriptions

subscriptions: Subscription = ...

- Defined in lib/json-viewer/json-viewer.component.ts:54

## Methods

### buildSegments

- buildSegments(inspectValue): void

- #### Parameters

  - inspectValue: any

  #### Returns void

  - Defined in lib/json-viewer/json-viewer.component.ts:139

### cleanObject

- cleanObject(obj, stack?): any

- #### Parameters

  - obj: any
  - stack: any[] = []

  #### Returns any

  - Defined in lib/json-viewer/json-viewer.component.ts:91

### isExpandable

- isExpandable(segment): boolean

- #### Parameters

  - segment: Segment

  #### Returns boolean

  - Defined in lib/json-viewer/json-viewer.component.ts:151

### ngOnChanges

- ngOnChanges(changes): void

- #### Parameters

  - changes: SimpleChanges

  #### Returns void

  Implementation of OnChanges.ngOnChanges

  - Defined in lib/json-viewer/json-viewer.component.ts:81

### ngOnInit

- ngOnInit(): void

- #### Returns void

  Implementation of OnInit.ngOnInit

  - Defined in lib/json-viewer/json-viewer.component.ts:77

### `Private` parseKeyValue

- parseKeyValue(key, value): Segment

- #### Parameters

  - key: any
  - value: any

  #### Returns Segment

  - Defined in lib/json-viewer/json-viewer.component.ts:161

### setInspectValue

- setInspectValue(json): void

- #### Parameters

  - json: any

  #### Returns void

  - Defined in lib/json-viewer/json-viewer.component.ts:126

### toggle

- toggle(segment): void

- #### Parameters

  - segment: Segment

  #### Returns void

  - Defined in lib/json-viewer/json-viewer.component.ts:155