foobardb
foobardb copied to clipboard
write db
how can I implementation writeline new key ?
Sorry, Can you elaborate?
Sorry, Can you elaborate?
I mean: how do we save the data on each separate line?
JSON module does the job of writing to file
JSON module does the job of writing to file
each separate line?
JSON module does the job of writing to file
each separate line?
There's no concept of line in JSON They're more like an array
JSON module does the job of writing to file
each separate line?
There's no concept of line in JSON They're more like an array
it constantly records to the same sequence number, not to the next array.
for example: {"1":{"name":"test"}}
not recording side by side.
That's not supposed to happen , are you sure you're using the latest script from master branch.?? I did these :
>>> from foobardb import FoobarDB
>>> x = FoobarDB("db.json")
>>> x.set("name" , "pal")
>>> x.set("age" , 0)
and If I do this, I get the expected output:
$ cat db.json
{"name": "pal", "age": 0}
Can you share what are doing exactly.
That's not supposed to happen , are you sure you're using the latest script from master branch.?? I did these :
>>> from foobardb import FoobarDB >>> x = FoobarDB("db.json") >>> x.set("name" , "pal") >>> x.set("age" , 0)and If I do this, I get the expected output:
$ cat db.json {"name": "pal", "age": 0}Can you share what are doing exactly.
just edit json file, not adding side by side
What do you mean by side by side? can you share your script?