I'm trying to create php-representations of Highcharts series in php+orm implementing the JsonSerializable Interface and then json_encode them into javascript in the view.
However the gradient for the fillColor uses a tuples array, which doesn't seem to have an equivalent in php, namely:
{stops: [
[0, "rgba(40, 96, 144, 0.35)"],
[1, "rgba(40, 96, 144, 0.0)"]
]
}
When I try to load this with json_decode I get an error JSON_ERROR_SYNTAX.
Is there some way to create the above json with json_encode in PHP or some alternative solution that would work with highcharts fillColor gradient.