7

I am trying to search a folder for an ID number. The folder contains various different file types. The ID can be found in several .json files, but non of them show up.

If I rename the .json file to .json2 or .jsont then the files show up in the search: enter image description here

If I try and use terminal and mdfind it is the same, .json files wouldn't show up when searching for the ID.

Is there some setting I need to change such that spotlight/mdfind will search inside .json files? Or will I have to rename all files?

Note: Some of the .json files are quite large (~16 MB). Does this matter?

  • 2
    possible duplicate (but without answer) of apple.stackexchange.com/questions/86852/… – grg Jan 27 '14 at 16:30
  • 1
    This is very interesting. Even after adding "json" to the Richtext.mdimport Spotlight file and re-indexing it will still not show the file in the results when searching for text that is in the contents of a JSON file. It will show JSON files in the results if they are searched for by name though... odd... – Dave Nelson Jan 27 '14 at 20:06
  • See also this answer, suggesting a third party, but free, software solution: apple.stackexchange.com/a/87231/185129 – aireties Dec 27 '18 at 1:33
4

You could try adding JSON to the Spotlight RichText importer. The process for XHTML is described here, and should be analogous for JSON:

http://lists.w3.org/Archives/Public/www-archive/2013Jun/0079.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .