diff --git a/yaql/__init__.py b/yaql/__init__.py index b0e90c7..5284ebf 100644 --- a/yaql/__init__.py +++ b/yaql/__init__.py @@ -67,7 +67,9 @@ def _setup_context(data, context, finalizer, convention): @specs.inject('engine', yaqltypes.Engine()) @specs.name('#finalize') def finalize(obj, limiter, engine): - return utils.convert_output_data(obj, limiter, engine) + if engine.options.get('yaql.convertOutputData', True): + return utils.convert_output_data(obj, limiter, engine) + return obj context.register_function(limit) context.register_function(finalize) diff --git a/yaql/language/expressions.py b/yaql/language/expressions.py index 90a7063..64f3c46 100644 --- a/yaql/language/expressions.py +++ b/yaql/language/expressions.py @@ -161,7 +161,10 @@ class Statement(Function): if context is None or context is utils.NO_VALUE: context = yaql.create_context() if data is not utils.NO_VALUE: - context['$'] = utils.convert_input_data(data) + if self.engine.options.get('yaql.convertInputData', True): + context['$'] = utils.convert_input_data(data) + else: + context['$'] = data return self(utils.NO_VALUE, context, self.engine) def __str__(self):