/// Delay the encoding of ta literal to JSON to a type-specific method
/// @access public
/// @param {*} $value - value to be stringified
/// @throw Unknown type for #{$value} (#{$type}).
/// @return {String} - JSON encoded string
/// @require {function} _json-encode--string
/// @require {function} _json-encode--number
/// @require {function} _json-encode--list
/// @require {function} _json-encode--map
/// @require {function} _json-encode--null
/// @require {function} _json-encode--color
/// @require {function} _json-encode--bool
@function json-encode($value) {
  $type: type-of($value);

  @if function-exists('_json-encode--#{$type}') {
    @return call('_json-encode--#{$type}', $value);
  }

  @error 'Unknown type for #{$value} (#{$type}).';
}

/// Delay the encoding of ta literal to JSON to a type-specific method
/// @access public
/// @param {*} $value - value to be stringified
/// @throw Unknown type for #{$value} (#{$type}).
/// @return {String} - JSON encoded string
/// @require {function} _json-encode--string
/// @require {function} _json-encode--number
/// @require {function} _json-encode--list
/// @require {function} _json-encode--map
/// @require {function} _json-encode--null
/// @require {function} _json-encode--color
/// @require {function} _json-encode--bool
@function json-encode($value) {
  $type: type-of($value);
  $function: '_json-encode--#{$type}';

  @if function-exists('get-function') {
    $function: get-function($function);
  }

  @if function-exists('_json-encode--#{$type}') {
    @return call($function, $value);
  }

  @error 'Unknown type for #{$value} (#{$type}).';
}

Resolve Sass deprecation warnings (Sass 3.5+)
Resolve Sass deprecation warnings (Sass 3.5+)
