Skip to content

Constructor and Factory Methods

Adrian edited this page Apr 1, 2021 · 5 revisions

Constructor

__construct( [array $options = []] )

Class constructor.

parameters

Factory Methods

For convenience, each of the provided sets of encode/decode options has a corresponding factory method. See Managing Options page for more details about each configuration.

static default( void ) : Json

Creates a new Json instance with default encode/decode options.

parameters

none

return value

The new Json instance.

static ascii( void ) : Json

Creates a new Json instance with "ascii" encode/decode options.

parameters

none

return value

The new Json instance.

static hex( void ) : Json

Creates a new Json instance with "hex" encode/decode options.

parameters

none

return value

The new Json instance.

static html( void ) : Json

Creates a new Json instance with "html" encode/decode options.

parameters

none

return value

The new Json instance.

static pretty( void ) : Json

Creates a new Json instance with "pretty" encode/decode options.

parameters

none

return value

The new Json instance.