def extract_internal(self, query=None, args=None, body=None, headers=None):
        if PYTHON_MAJOR_VERSION > 2 and isinstance(body, binary_type):
            body = text_type(body, 'utf-8')  # Default JSON encoding

        try:
            body = json.loads(body)
            return self.query_dictionary(query, body)
        except ValueError:
            raise ValueError("Not legal JSON!")
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/validators.py/MiniJsonExtractor.extract_internal/original