coveralls: 
[![Coverage Status](https://coveralls.io/builds/8411457/badge)](https://coveralls.io/builds/8411457)

Coverage decreased (-1.8%) to 80.0% when pulling **f405db260506c60284215d247f886eef63ad8898 on raw-output** into **c5cc6ce947f65446926749039542004f3c5a2a2b on master**.

coveralls: 
[![Coverage Status](https://coveralls.io/builds/8411508/badge)](https://coveralls.io/builds/8411508)

Coverage increased (+0.2%) to 82.0% when pulling **6296205b798a73cc82ffd3d9223d11c7ff79ad9e on raw-output** into **c5cc6ce947f65446926749039542004f3c5a2a2b on master**.

diff --git a/jqp/__init__.py b/jqp/__init__.py
index 19e1ea8..def3f62 100644
--- a/jqp/__init__.py
+++ b/jqp/__init__.py
@@ -6,6 +6,12 @@ import sys
 __version__ = '0.0.0.1'
 
 
+if sys.version_info.major >= 3:
+    _basestring = str
+else:
+    _basestring = basestring  # NOQA
+
+
 def _exit(error, return_code, message):
     sys.stderr.write(message)
     sys.stderr.write('\nOiginal error: ')
@@ -14,7 +20,7 @@ def _exit(error, return_code, message):
     sys.exit(return_code)
 
 
-def run(in_io, out_io, cmd, imports=[], sort_keys=False):
+def run(in_io, out_io, cmd, imports=[], sort_keys=False, raw_output=False):
     environment = {}
     for mod_name in imports:
         try:
@@ -39,10 +45,13 @@ def run(in_io, out_io, cmd, imports=[], sort_keys=False):
         except Exception as e:
             _exit(e, 3, 'Cannot execute command: line %d' % line_no)
 
-        try:
-            json.dump(out, out_io, sort_keys=sort_keys)
-        except Exception as e:
-            _exit(e, 3, 'Cannot dump result: line %d' % line_no)
+        if raw_output and isinstance(out, _basestring):
+            out_io.write(out)
+        else:
+            try:
+                json.dump(out, out_io, sort_keys=sort_keys)
+            except Exception as e:
+                _exit(e, 3, 'Cannot dump result: line %d' % line_no)
 
         out_io.write('\n')
 
@@ -59,8 +68,11 @@ def main():
     parser.add_argument(
         '--sort-keys', '-S', action='store_true',
         help='sort keys in objects when the command print it')
+    parser.add_argument(
+        '--raw-output', '-r', action='store_true',
+        help='when a result is string, the command shows a raw string')
 
     args = parser.parse_args()
 
     run(sys.stdin, sys.stdout, args.cmd, imports=getattr(args, 'import'),
-        sort_keys=args.sort_keys)
+        sort_keys=args.sort_keys, raw_output=args.raw_output)

Make raw output mode
It shows raw string instead of showing JSON string.
diff --git a/tests/run_test.py b/tests/run_test.py
index 4f26ab8..f2fb837 100644
--- a/tests/run_test.py
+++ b/tests/run_test.py
@@ -31,6 +31,14 @@ class RunTest(unittest.TestCase):
         jqp.run(inputs, outputs, '{"a": 0, "b": 0, "c": 0}', sort_keys=True)
         self.assertEqual(outputs.getvalue(), '{"a": 0, "b": 0, "c": 0}\n')
 
+    def test_raw_output(self):
+        # This command ignores input
+        inputs = StringIO('''1
+''')
+        outputs = StringIO()
+        jqp.run(inputs, outputs, '"a"', raw_output=True)
+        self.assertEqual(outputs.getvalue(), 'a\n')
+
     def test_parse_error(self):
         inputs = StringIO('invalid\n')
         outputs = StringIO()

pip install -e .
parse_log_pytest
pytest
pytest coverage hacking
apt-get update apt-get install -y gcc
3.5
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs @ file:///opt/conda/conda-bld/attrs_1642510447205/work
certifi==2021.5.30
coverage==6.2
flake8==3.8.4
hacking==4.1.0
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1631916693255/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
-e git+https://github.com/unnonouno/jqp.git@c5cc6ce947f65446926749039542004f3c5a2a2b#egg=jqp
mccabe==0.6.1
more-itertools @ file:///tmp/build/80754af9/more-itertools_1637733554872/work
packaging @ file:///tmp/build/80754af9/packaging_1637314298585/work
pluggy @ file:///tmp/build/80754af9/pluggy_1615976315926/work
py @ file:///opt/conda/conda-bld/py_1644396412707/work
pycodestyle==2.6.0
pyflakes==2.2.0
pyparsing @ file:///tmp/build/80754af9/pyparsing_1635766073266/work
pytest==6.2.4
toml @ file:///tmp/build/80754af9/toml_1616166611790/work
typing_extensions @ file:///opt/conda/conda-bld/typing_extensions_1647553014482/work
zipp @ file:///tmp/build/80754af9/zipp_1633618647012/work

name: jqp
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - attrs=21.4.0=pyhd3eb1b0_0
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - importlib-metadata=4.8.1=py36h06a4308_0
  - importlib_metadata=4.8.1=hd3eb1b0_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - more-itertools=8.12.0=pyhd3eb1b0_0
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - packaging=21.3=pyhd3eb1b0_0
  - pip=21.2.2=py36h06a4308_0
  - pluggy=0.13.1=py36h06a4308_0
  - py=1.11.0=pyhd3eb1b0_0
  - pyparsing=3.0.4=pyhd3eb1b0_0
  - pytest=6.2.4=py36h06a4308_2
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - toml=0.10.2=pyhd3eb1b0_0
  - typing_extensions=4.1.1=pyh06a4308_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zipp=3.6.0=pyhd3eb1b0_0
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - coverage==6.2
      - flake8==3.8.4
      - hacking==4.1.0
      - mccabe==0.6.1
      - pycodestyle==2.6.0
      - pyflakes==2.2.0
prefix: /opt/conda/envs/jqp

tests/run_test.py::RunTest::test_raw_output
tests/run_test.py::RunTest::test1 tests/run_test.py::RunTest::test_dump_error tests/run_test.py::RunTest::test_execution_error tests/run_test.py::RunTest::test_import tests/run_test.py::RunTest::test_import_error tests/run_test.py::RunTest::test_parse_error tests/run_test.py::RunTest::test_sort_keys
jqp/__init__.py
jqp/__init__.py