Convert Python list to JSON array | Example code

Use json.dumps() to convert a list to a JSON array in Python. The dumps() function takes a list as an argument and returns a JSON String. Python list to JSON array example Simple example code converting given list [“1”, “2”, “3”] to a JSON array results in the string ‘[“1”, “2”, “3”]’. For this example, Read More…