JSON contains minus ("-") char: is it valid / standard?

I am working with an API that sends JSON responses as follows:

    [
  - {
    "id": 46843639,
    "nickname": "JSON",
    "registration_date": "2004-03-07T23:16:20.000-04:00",
    "country_id": "BR",
    "user_type": "normal",
    "logo": null,
    "points": 91,
    "site_id": "JSN",
    "permalink": "http://xxxxxx",
    "seller_reputation": - {
      "level_id": "2_orange",
      "power_seller_status": null,
      "transactions": - {
        "period": "historic",
        "total": 14,
        "completed": 8,
        "canceled": 6,
        "ratings": - {
          "positive": 1,
          "negative": 0,
          "neutral": 0,
        },
      },
    },
    "status": - {
      "site_status": "active",
    },
  },
]

I could not find this minus sign "-" in any specification documents. Is this standard JSON?

+3
source share
1 answer

No no. The server sends you broken JSON.

Only the times -when they are in the line, when it immediately precedes the number, or when it immediately follows eor ein the floating point number, are valid .

Add to this, commas should separate name / value pairs and array elements, not follow them. These commas after the last record in each object / array are also invalid.

+5
source

All Articles