-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make json viewer more clear #2334
Conversation
It is usefull when dumping, for example, in file, because does not produce lot of lines and can be easily copied to interactive json viewer. However it looks reasonable for some cases. I'll take a look how to make it optional. |
Yes, better make it optional. |
I propose adding
And make new output proposal work for JSONDESERIALIZABLE_PARSE_OUTPUT == True. And ignore None-s on JSONDESERIALIZABLE_SKIP_NONE == True. |
i don’t think it should be optional, because bot api ignoring them, pytba should be close to bot api. |
It should be optional. You can set it to True by default if you want to. |
I think skipping Nones should be True. API does not provide them, so what is the point of having them? |
hmm, json_string doesn’t contain all currently info, like |
"from" is a keyword in Python, so it was changed to "from_user" in spite of being in API. |
i know, but json viewer must view the object attributes, not the json_string from bot api |
Why was this closed again? This should've been re-implemented to be optional? |
i removed the repo by mistake, i forgot about this PR it was disappeared from recent activities so, if you want me to open new pr just tell me |
I propose:
@Badiboy need your opinion. This way, users will be able to see a CLEAR response from Telegram. |
And then, we can add some JSON_FORMATTED = FALSE or something like this to types. |
@2ei please recreate PR, I will re-comment my comments on the new PR |
make printing types understandable by using json.dumps, and ignore fields with None value, as Bot API did.