-2

i am trying do decode this json file

{"name":"apple","price":1.2312312331231232e 23,"qty":-1,"num":5,"color":"","category":"FRUITS","_id":"VZbGneNygMKYCijr"}\n{"name":"orange","price":12,"qty":-7,"num":2,"color":"","category":"FRUITS","_id":"d892zf2ccyNlPAZM"}\n{"name":"apple","price":12,"qty":-5,"num":4,"color":"","category":"FRUITS","_id":"dja3UQ7vBUs1xBHw"}\n{"name":"apple","price":12,"qty":-7,"num":1,"color":"","category":"FRUITS","_id":"yZc1lMB0SKoSIsxw"}\n{"name":"apple","price":12,"qty":-8,"num":3,"color":"","category":"FRUITS","_id":"yyPn4UcDin6uAY52"}\n
Till Helge
  • 9,253
  • 2
  • 40
  • 56

1 Answers1

1

There are many ways to read a file, let's say file_get_contents()

$file = file_get_contents('FILE WITH FULL PATH');

$decoded = json_decode ($file);

var_dump($decoded);

You are OK.