'Invalid json list. A tag list submitted in string form must be valid json.
See original GitHub issueWhen I try to create object from test client I get this error {'tag': ['Invalid json list. A tag list submitted in string form must be valid json.']}
. Here is the code:
self.client.post('/api/notes/', data={'tag': ["xyz"], 'iv': 'random', 'content': "New content",
'date': self.current_date_time})
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (2 by maintainers)
Top Results From Across the Web
django rest framework , Invalid json list - Stack Overflow
A tag list submitted in string form must be valid json." ] } I am using django-taggit and django-taggit-serializer packages.
Read more >The given data was not valid JSON. | Apple Developer Forums
The error message is accurate. In your example data, the token NULL is not valid JSON. It's case-sensitive so it needs to be...
Read more >How to Fix the Invalid JSON Error in WordPress? - Rank Math
In this article, learn how to fix the invalid JSON error - 'Updating failed. The response is not a valid JSON response.' with...
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >[Solved]-json.loads converts valid JSON to invalid JSON-django
JSON library in python converts JSON string into a python understandable, list and dictionary. That is the reason the 'true' and 'false' strings...
Read more >Top Related Medium Post
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found the forum article says request.data is sometimes QueryDict, sometimes normal dict. Maybe converting request.data from QueryDict to dict in views.py can temporally solve the problem…
[ “tag1”, “tag2” ]
This worked for me