General

functions

json-decode

@function json-decode($json) { ... }
View source

Description

Parse a JSON string

Parameters

parameter Name parameter Description parameter Type parameter Default value
$json

JSON string to parse

String none

Returns

Any

Throws

  • Input string may not be null.

_json-decode--true

@function _json-decode--true($source, $pointer) { ... }
View source

Description

Parses a JSON encoded true

Parameters

parameter Name parameter Description parameter Type parameter Default value
$source

JSON complete source

String none
$pointer

current pointer

Number none

Returns

(new pointer, true)

List

Throws

  • Unexpected token t.

_json-decode--false

@function _json-decode--false($source, $pointer) { ... }
View source

Description

Parses a JSON encoded false

Parameters

parameter Name parameter Description parameter Type parameter Default value
$source

JSON complete source

String none
$pointer

current pointer

Number none

Returns

(new pointer, false)

List

Throws

  • Unexpected token f.

_json-decode--list

@function _json-decode--list($source, $pointer) { ... }
View source

Description

Parses a JSON encoded array

Parameters

parameter Name parameter Description parameter Type parameter Default value
$source

JSON complete source

String none
$pointer

current pointer

Number none

Returns

List

Throws

  • Unexpected comma in array literal.

  • Missing comma in array literal.

  • Unterminated array literal.

_json-decode--map

@function _json-decode--map($source, $pointer) { ... }
View source

Description

Parses a JSON encoded object

Parameters

parameter Name parameter Description parameter Type parameter Default value
$source

JSON complete source

String none
$pointer

current pointer

Number none

Returns

List

Throws

  • Unexpected comma in object literal.

  • Unexpected token $token in object literal.

  • Missing comma in object literal.

  • Unterminated object literal.

  • Consuming token : failed.

Requires

_json-decode--null

@function _json-decode--null($source, $pointer) { ... }
View source

Description

Parses a JSON encoded null

Parameters

parameter Name parameter Description parameter Type parameter Default value
$source

JSON complete source

String none
$pointer

current pointer

Number none

Returns

List

Throws

  • "Unexpected token n."

_json-decode--number

@function _json-decode--number($source, $pointer) { ... }
View source

Description

Parses a JSON encoded number

Parameters

parameter Name parameter Description parameter Type parameter Default value
$source

JSON complete source

String none
$pointer

current pointer

Number none

Returns

List

Throws

  • "Unexpected token $token."

  • "Unexpected end of stream."

_json-decode--string

@function _json-decode--string($source, $pointer) { ... }
View source

Description

Parses a JSON encoded string

Parameters

parameter Name parameter Description parameter Type parameter Default value
$source

JSON complete source

String none
$pointer

current pointer

Number none

Returns

List

Throws

  • Unterminated string.

Used by

json-encode

@function json-encode($value) { ... }
View source

Description

Delay the encoding of ta literal to JSON to a type-specific method

Parameters

parameter Name parameter Description parameter Type parameter Default value
$value

value to be stringified

Any none

Returns

JSON encoded string

String

Throws

  • Unknown type for #{$value} (#{$type}).

  • Unknown type for #{$value} (#{$type}).

Used by

mixins

json-encode

@mixin json-encode($value, $flag: all) { ... }
View source

Description

JSON.stringify a value and pass it as a font-family of head element

Parameters

parameter Name parameter Description parameter Type parameter Default value
$value

value to be stringified

Any none
$flag

output driver

String all

Requires