#

API Docs for: 1.4.3
Show: Inherited Protected Private Deprecated

# JsonLoader Class

Uses

- EventTarget

Defined in: `src/pixi/loaders/JsonLoader.js:5`
Module: PIXI

The json file loader is used to load in JSON data and parse it When loaded this class will dispatch a 'loaded' event If loading fails this class will dispatch an 'error' event

## Constructor

### `JsonLoader`

(

- `url`
- `crossorigin`

)

Defined in `src/pixi/loaders/JsonLoader.js:5`

#### Parameters:

- `url` String

  The url of the JSON file

- `crossorigin` Boolean

  Whether requests should be treated as crossorigin

- Index
- Methods
- Properties

## Item Index

### Methods

- load
- onError
- onJSONLoaded
- onLoaded

### Properties

- baseUrl
- crossorigin
- loaded
- url

## Methods

### `load`

()

Defined in `src/pixi/loaders/JsonLoader.js:58`

Loads the JSON data

### `onError`

() private

Defined in `src/pixi/loaders/JsonLoader.js:164`

Invoke when error occured

### `onJSONLoaded`

() private

Defined in `src/pixi/loaders/JsonLoader.js:75`

Invoke when JSON file is loaded

### `onLoaded`

() private

Defined in `src/pixi/loaders/JsonLoader.js:150`

Invoke when json file loaded

## Properties

### `baseUrl`

String

Defined in `src/pixi/loaders/JsonLoader.js:35`

[read-only] The base url of the bitmap font data

### `crossorigin`

Boolean

Defined in `src/pixi/loaders/JsonLoader.js:27`

Whether the requests should be treated as cross origin

### `loaded`

Boolean

Defined in `src/pixi/loaders/JsonLoader.js:44`

[read-only] Whether the data has loaded yet

### `url`

String

Defined in `src/pixi/loaders/JsonLoader.js:19`

The url of the bitmap font data