mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #197] Prettify non-standard JSON in android app #154
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kzshantonu on GitHub (Apr 3, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/197
Certain apps eg: Uptime Kuma POST a lot of information as JSON. Would be nice if the android app displayed these as somewhat human readable format eg: as a table
@binwiederhier commented on GitHub (Apr 3, 2022):
Can you give a concrete example? Is this the same as #104 again, or is this about the presentation of the data?
ntfy should not be changing your message at all; that seems wildly out of scope. ntfy should also not know what you are sending, so if it's JSON from Uptime Kuma or a random other message doesn't matter to ntfy.
It may be useful to have Markdown support for basic formatting, but typically I want to avoid that, because the overall app appearance suffers from it.
@kzshantonu commented on GitHub (Apr 5, 2022):
A bit different from #104. Mine was purely about cosmetics. Instead of displaying the json as a text blob (unformatted), it could prettify it. Currently, Kuma notifications are displayed like this in the app:

The app when it detects JSON, could for example, add some colors and format it in a human readable form
@binwiederhier commented on GitHub (Apr 5, 2022):
While I understand your rationale behind this, I think this is very much outside the scope of what ntfy should do. If you want your message to look different, you should send another message. What you're describing sounds like an email program modifying emails at will, which is unexpected and would feel intrusive.
Plus, messages are by default broadcast as Android intent, meaning that other apps can read and process them. I shouldn't modify the payload at all for that reason too.
.o hope that makes sense.
@kzshantonu commented on GitHub (Apr 5, 2022):
Good point. Maybe the notification and/or intent can still stay original but the json can be parsed and displayed inside the app in a prettified way, like in a code editor for example, like this:

The data itself doesn't change at all. It's all just aesthetics. There could be a small button to view the raw message. Or the raw message could be the default and the small button is to prettify json
@binwiederhier commented on GitHub (Apr 12, 2022):
I really don't think that ntfy should do this. If it was easy I'd maybe do it, but it's a ton of work and probably some libraries for what seems to be a pretty odd edge case.
I'm taking the liberty of rejecting this proposal. Please do not take this personally, and do not be discouraged to submit more ideas. I love seeing how people are using ntfy and it makes me happy that you guys wanna add features. But please do understand that I can't implement every idea.
Thank you.