# Class JsonViewerComponent

#### Implements

- OnInit
- OnChanges

- Defined in json-viewer/json-viewer.component.ts:42

#####
Index

### Constructors

constructor

### Properties

cdr
expanded
ignoredProperties
ignoredTypes
inspectValue
json
segments
subscriptions

### Methods

buildSegments
cleanObject
isExpandable
ngOnChanges
ngOnInit
setInspectValue
toggle

##
Constructors

### constructor

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

  #### Parameters

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

  #### Returns JsonViewerComponent

  - Defined in json-viewer/json-viewer.component.ts:57

##
Properties

### cdr

cdr: ChangeDetectorRef

- Defined in json-viewer/json-viewer.component.ts:60

### expanded

expanded: boolean = false

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

### ignoredProperties

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

- Defined in json-viewer/json-viewer.component.ts:50

### ignoredTypes

ignoredTypes: any[] = []

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

### inspectValue

inspectValue: any

- Defined in json-viewer/json-viewer.component.ts:48

### json

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

- Defined in json-viewer/json-viewer.component.ts:45

### segments

segments: Segment[] = []

- Defined in json-viewer/json-viewer.component.ts:55

### subscriptions

subscriptions: Subscription = ...

- Defined in json-viewer/json-viewer.component.ts:53

##
Methods

### buildSegments

- buildSegments(inspectValue: any): void

  #### Parameters

  - inspectValue: any

  #### Returns void

  - Defined in json-viewer/json-viewer.component.ts:138

### cleanObject

- cleanObject(obj: any, stack?: any[]): any

  #### Parameters

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

  #### Returns any

  - Defined in json-viewer/json-viewer.component.ts:90

### isExpandable

- isExpandable(segment: Segment): boolean

  #### Parameters

  - segment: Segment

  #### Returns boolean

  - Defined in json-viewer/json-viewer.component.ts:150

### ngOnChanges

- ngOnChanges(changes: SimpleChanges): void

  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

  - Defined in json-viewer/json-viewer.component.ts:80

### ngOnInit

- ngOnInit(): void

  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

  - Defined in json-viewer/json-viewer.component.ts:76

### setInspectValue

- setInspectValue(json: any): void

  #### Parameters

  - json: any

  #### Returns void

  - Defined in json-viewer/json-viewer.component.ts:125

### toggle

- toggle(segment: Segment): void

  #### Parameters

  - segment: Segment

  #### Returns void

  - Defined in json-viewer/json-viewer.component.ts:154