Replies: 1 comment
-
From the jsonl extension, I guess you use json lines format (https://jsonlines.org/). It itself is not valid json document, but every line is a standalone document itself. That's why JSON Machine parses only the first line - the first valid document. JSONL is usually parsed by reading a document one line at a time and simply |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Its Show always first Object - My json file size is 634 MB
`
require_once './vendor/autoload.php';
$testfile = './propertycatalog.expediacollect.en-US.jsonl';
use JsonMachine\JsonDecoder\ExtJsonDecoder;
use JsonMachine\Items;
$objects = Items::fromFile($testfile, ['decoder' => new ExtJsonDecoder(true)]);
foreach ($objects as $id => $user) {
// just process $user as usual
}
`
Beta Was this translation helpful? Give feedback.
All reactions