jsonfile-type

What is the difference between a .JSON file and .JL file?


I have both JSON file and JL file on my computer but when I open them in Notepad their structure looks like the same. What is the difference between them? where shall I use each one?


Solution

  • Actually, at the time I asked this question, I didn’t know that "the file type is no guarantee of what is inside it." In other words, I thought that every file name had its own manifesto, for example, if a file’s name was ‘.something,’ then it MUST have had a unique ‘.something’ manifesto. But now I know that I can create a file, write anything I want into it, and name it ‘.pokemon’, and there’s nothing special about it!

    What was that file? the file was JSON Lines file format. Also know as .jsonl file.

    Where did I find it? in Scrapy except writing scrapy crawl name -o file.json I saw that somebody wrote scrapy crawl name -o file.jl. I tried that and the file was 99% like JSON file so I wondered and asked this question here.

    So:

    What is the difference between a .JSON file and .JL file? Now I know that the better question is "What is the difference between a .JSON file and .JL file in the Scrapy?"

    The JSON Line is like JSON but without the "[" and "]" at the beginning and the end. it is used in the Scrapy because of this