From 4cd58cdacf9d57a174e522cdd69becbed9f33c0c Mon Sep 17 00:00:00 2001 From: Adam Griffiths Date: Thu, 1 Dec 2016 11:34:57 +1100 Subject: [PATCH] Use simplejson for better error descriptions. The standard json library only provides an error that the json failed to parse. simplejson provides actual character and line numbers along with an expected character in it's errors. This makes writing elasticsearch queries much easier. --- redash/query_runner/elasticsearch.py | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/redash/query_runner/elasticsearch.py b/redash/query_runner/elasticsearch.py index 6b83a1d445..26cdcb9973 100644 --- a/redash/query_runner/elasticsearch.py +++ b/redash/query_runner/elasticsearch.py @@ -1,4 +1,4 @@ -import json +import simplejson as json import logging import sys import urllib diff --git a/requirements.txt b/requirements.txt index 2ccc3df6ca..8d3246c760 100644 --- a/requirements.txt +++ b/requirements.txt @@ -41,3 +41,4 @@ pystache==0.5.4 parsedatetime==2.1 cryptography==1.4 Flask-Limiter==0.9.3 +simplejson==3.10.0