# Class JsonViewerComponent

#### Implements

- OnInit
- OnChanges

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

#####
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:60

##
Properties

### cdr

cdr: ChangeDetectorRef

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

### expanded

expanded: boolean = false

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

### ignoredProperties

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

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

### ignoredTypes

ignoredTypes: any[] = []

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

### inspectValue

inspectValue: any

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

### json

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

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

### segments

segments: Segment[] = []

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

### subscriptions

subscriptions: Subscription = ...

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

##
Methods

### buildSegments

- buildSegments(inspectValue: any): void

  #### Parameters

  - inspectValue: any

  #### Returns void

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

### cleanObject

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

  #### Parameters

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

  #### Returns any

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

### isExpandable

- isExpandable(segment: Segment): boolean

  #### Parameters

  - segment: Segment

  #### Returns boolean

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

### 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:83

### 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:79

### setInspectValue

- setInspectValue(json: any): void

  #### Parameters

  - json: any

  #### Returns void

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

### toggle

- toggle(segment: Segment): void

  #### Parameters

  - segment: Segment

  #### Returns void

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