Add possibility to use JSON slicing file

The input format is recognized from the file extension.

Resolves #15.