[Solved] i don’t understand what’s wrong with this JSON


Assuming: You are pasting the “url” in the jsonformatter to validate the json.

Your JSON is structurally valid.

The errors shown are related to the missing metadata about content that your service should expose. Typically the client that would consume any resources you may expose over the network might/would like to know (among other things):

  1. What type of content is being returned
  2. What is the charset / character encoding I should use to make sense of the payload. Most of the clients default to UTF-8, so in that case, this error is more of a warning, but better to explicitly mention it.

The client would look for this information in the Content-type response header.

The server/service exposing that JSON, is not setting the Content-type: application/json; charset=utf-8 in the response header, thus the tool raises the error.

Edit (Bonus tip): If you have any confusion about the content header for the json, would definitely recommend reading this question

2

solved i don’t understand what’s wrong with this JSON