I am getting this error while importing a JSON dataset from a website.
JSONDecodeError: Expecting value: line 1 column 2 (char 1)
I am working in colaboratory and wanted to import the sarcastic dataset, but since I don't know JSON, I am stuck. I have tried different placements of slash() character and also changing the -o parameter but nothing works correctly...my code[reprex]:=====>
!wget --no-check-certificate \ https://storage.googleapis.com/laurencemoroney-blog.appspot.com/sarcasm.json -o /tmp/sarcasm.json
import json
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences
#importing the Sarcasm dataset from !wget --no-check-certificate \ https://storage.googleapis.com/laurencemoroney-blog.appspot.com/sarcasm.json \
#-o /tmp/sarcasm.json
with open("/tmp/sarcasm.json", 'r') as f:
datastore = json.load(f)
datastore = json.detect_encoding()
print (datastore)
sentences = []
labels = []
urls = []
I think the problem might be the fact the the data is being imported in HTML format, which has to be converted in JSON format(or something compatible with it). Any help would be appreciated! :)