#๐ Python & JSON Issue
12 messages ยท Page 1 of 1 (latest)
@sly light
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Why do you need it like that? AFAIK the json module functions don't do that
those are identical... And I don't think you can adjust how line breaks are added with the json module
Not sure that's easily doable in any json library... you want some lists to have line breaks and some not... some objects to have line breaks, and some not... it's mixed behaviour.
you might need to make a custom json dumper or something like that. not sure.
json is also more for machines to read and actually less for humans (even though humans can read it fairly easy - it's better than e.g. xml anyway). Not sure there is a reasonable solution to your issue
well, json works as long as it's little data
you can write your own JSONEncoder ...
https://docs.python.org/3/library/json.html
I think you can use any json formatter to achieve this, once the file is generated, with custom line length logics
I don't think the issue is with any function but the cosmatic beauty of data visualization, formater may become your best friend for that
!close
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.