Creating JSON objects from files