I think you want to remove the splitlines(); otherwise, you'll be returning the string representation of a Python list of lines of JSON.