'TypeError: Object of type Tag is not JSON serializable

I am trying to send my result as JsonResponse but when I run the function then it is showing every time

TypeError: Object of type Tag is not JSON serializable

views.py

def saveJson(request):
    response = getReturnedData()

    results = []

    for result in response:
        results.append({'json': result})

    return JsonResponse({'results': results})

returned data from getReturnedData() is :-

Note :- "Image1" is not the real data I got in list BUT it is a link of image url (not string), I didn't post it because stackoverflow was showing spam while posting img links

[
    "Image1", 
    "Image1"
]

converted from for loop is :-

[
    {
        'response': [
                       "Image1", 
                       "Image2"
                     ]
    }
]

I have also tried by using json.dumps but it returns nothing

And I also tried using data = serializers.serialize("json", results) but it showed

'NoneType' object has no attribute 'concrete_model

I have tried hours but it didn't work, Any help would be much Appreciated. Thank You in Advance



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source