Can json.dumps create multiple lines
Cecil Westerhof
Cecil at decebal.nl
Thu Dec 1 11:30:31 EST 2016
More information about the Python-list mailing list
Thu Dec 1 11:30:31 EST 2016
- Previous message (by thread): The Case Against Python 3
- Next message (by thread): Can json.dumps create multiple lines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I started to use json.dumps to put things in a SQLite database. But I
think it would be handy when it would be easy to change the values
manually.
When I have a value dummy which contains:
['An array', 'with several strings', 'as a demo']
Then json.dumps(dummy) would generate:
'["An array", "with several strings", "as a demo"]'
I would prefer when it would generate:
'[
"An array",
"with several strings",
"as a demo"
]'
Is this possible, or do I have to code this myself?
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
- Previous message (by thread): The Case Against Python 3
- Next message (by thread): Can json.dumps create multiple lines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list