JSON.parse: unexpected character at line 1 column 2 of the JSON data

JSON.parse: unexpected character at line 1 column 2 of the JSON data

This seems to be a common "problem" but i could not find a solution somewhere else, so im asking here.

I get this with ajax from an flask app, which seems to be valid json (at least to me).

  1. {
      "payload": {
        "data": [
          10,
          267,
          34,
          376
        ],
        "labels": [
          "NEW LPARS",
          "ACTIVE LPARS",
          "DISABLED LPARS",
          "ALL LPARS"
        ]
      }
    }

The jquery part which is meant to draw a simple Chart.js Bar Chart.

  1. // top bar chart begin
  2. $(document).ready(function(){
  3.    var _data;
  4.    var _labels;
  5. $.ajax({
  6.    url: "/get_chart_data",
  7.    type: "GET",
  8.    data: {key: 'top_bar'},
  9.  success: function(response) {
  10.    full_data = JSON.parse(response.payload);
  11.    _data = full_data['data'];
  12.    _labels = full_data['labels'];
  13.    },
  14.  error: function(result) {
  15.    alert("Error");
  16.  }
  17. });
  18. new Chart(document.getElementById("bar-chart-top"), {
  19.   type: 'bar',
  20.   data: {
  21.     labels: _labels,
  22.     datasets: [{
  23.         data: _data,
  24.         label: "LPAR COUNT",
  25.         borderColor: "#3e95cd",
  26.         backgroundColor: ["#3e95cd", "#8e5ea2","#3cba9f","#e8c3b9"],
  27.         fill: true
  28.       },
  29.     ]
  30.   },
  31.   options: {
  32.     legend: { display: false },
  33.     title: {
  34.       display: true,
  35.       text: 'LPAR STATUS'
  36.     }
  37.   }
  38. });
  39. });
  40. // top bar chart end

I always get "SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data".

any hints whats wrong?