Page 1 of 1

recovering JSON files

Posted: 28 Mar 2018, 19:07
by pollat
Photorec ignores JSON files. I tried to understand why, while testing on a 128mb sd card and finally solved it:

If I place two files - TXT and JSON on sd card, Photorec recovers only one of them. I tried different ways, copied contents of JSON to TXT and vice versa, saving as different encodings, it does not matter.
But -if I add a new line somewhere in JSON file , then Photorec will recover it, at least starting with separating line (or /newline, or whatever)

So, it looks like Photorec ignores JSON files because they are formatted as a single string of text


Last time when I was backing up my firefox and thunderbird profiles at work, parts of the appData folders did not back up, and now I am royally screwed because it contained important tax documents and login info. I can find all sorts of stuff except JSON files.
I wonder if partition can be searched for raw text data, and how many light years would it take to find a string on a 300GB partition...

Re: recovering JSON files

Posted: 30 Mar 2018, 08:47
by cgrenier
Currently PhotoRec discards text files where there is no new line in the first 512 bytes. ... file_txt.c line 1204

It need better heuristics to handle json files...