-1

https://www.toyota.de/automobile/corolla/index.json

I understand how .JSON works but, how is it possible to use that instead of say, .php or .html this is the first time I've seen anything like that.

3
  • 2
    A web server is completely free to interpret a URL however it wants and, to return whatever response it wants to return. I don't know enough about the web hosting business to recognize whether there's some out-of-the-box toolkit that uses .json files in that way, but with enough custom code, anything is possible. Commented Feb 14, 2018 at 20:05
  • 2
    In other words, the file extension in the url doesn't always mean that's what you're getting back from the server. In this case, index.json is Content-Type: text/html; charset=utf-8. It is odd, though, I'll give you that. Commented Feb 14, 2018 at 20:37
  • Could one of you guys respond as an answer, not as a comment because for some reason this post is getting downvoted without any real reason why. That way I can make it as an answer Commented Feb 14, 2018 at 20:51

1 Answer 1

2

This is a pure, wild-ass guess, but since nobody else has answered...

I'd bet that that URL names an actual .json file on the server. I expect that when you ask for it, the server runs some hunk of custom code that reads the .json file, and then generates an HTML document for the server to return. What I don't know is whether the developers used a third party toolkit, or whether they invented it themselves.

A smart web developer would use a popular third party tool kit, and let somebody else do the work of keeping up-to-date with the ever changing standards that define the web.

1
  • Thanks bud, it just totally surprised me and it is kind of odd as to why they would utilize that method. I can't image e-mail servers throwing spam errors or malicious flags when detecting anything but .php or .html Commented Feb 15, 2018 at 18:19

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.