Closed jfb-h closed 3 years ago
It looks like the jsonlines
keyword is currently only implemented for the JSON3.read(str; jsonlines=true)
method and not reading into a type. @quinnj should it be implemented?
Thanks for the heads up! I guess I can just readlines()
and then parse each line individually but having the keyword supported directly for the type method would certainly be convenient.
Hmmm, yes, I think this should probably work. I don't remember if I looked into it specifically when we implemented jsonlines
for the non-typed case. I'll take a look.
I created a fix for this in #178
Im struggling to read an array of custom type instances from a .jsonl file.
Let's say you have a file looking like this:
and a struct like this:
Then reading the file like this:
results in only the first object being read, while reading it into an array, like so:
results in the following error message:
Is this a bug or am I just doing something wrong?