diff --git a/package.json b/package.json index 19ad570b..2b380b80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stated-js", - "version": "0.1.36", + "version": "0.1.37", "license": "Apache-2.0", "description": "JSONata embedded in JSON", "main": "./dist/src/index.js", diff --git a/src/CliCoreBase.ts b/src/CliCoreBase.ts index c8c46177..093bef49 100644 --- a/src/CliCoreBase.ts +++ b/src/CliCoreBase.ts @@ -93,7 +93,9 @@ export class CliCoreBase { if (fileExtension === 'yaml' || fileExtension === 'yml') { return yaml.load(fileContent); - } else { + }else if (fileExtension === 'text' || fileExtension === 'txt') { + return fileContent; + }else { return JSON.parse(fileContent); } }