Answer the question
In order to leave comments, you need to log in
Is the data written to json incorrectly?
good day, there is such a code
with open("base.json", "r+",encoding = "utf-8") as f:
base = json.load(f)
print (str(base)) //строчки что бы убедиться что я получаю то что надо
print(type(base)) //строчки что бы убедиться что я получаю то что надо
base["user"] = { "se" : 1}
json.dump( base , f)
{
"user" : {}
}
{
"user" : {}
}{"user": {"se": 1}}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question