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?
Actually, at the time that I was asking this question I didn't know that "the file type is no guarantee of what is inside it". in other words, I thought that for every file name, there is a separate manifesto and if a file's name is ".something", there is a unique manifesto for it. But now I know that I can create a file, write anything that I want into it and name it ".pokemon" and yes there is nothing special about it!
What was that file? the file was JSON Lines file format.
Where did I find it? in the 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