Add support for JSON files

Support should be added to parse JSON files into the same internal structure.