question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

custom json issue

See original GitHub issue

Question i’m using changedetection.io which uses apprise as notification backend. i noticed custom json is sent in a fixed structure like this:

{
   "version": "1.0",
   "title": "Some Title",
   "message": "Some Message",
   "type": "info"
}

my question is: Can i send a custom json structure? Please tell me how if yes. like this:

{
   "title": "Some Title",
   "body": "Some Body",
   "device_key": "Some Key",
   "level": "Some Level",
   "sound": "Some Sound",
   "group": "Some Group",
   "isArchive": true
   maybe some more custom k/v bla.. bla.. bla...
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
caronccommented, Apr 10, 2022

The payload that you pass in was never intended to be converted into a JSON Array; just like the payload can’t convert the word ‘false’ to an actual JSON False variable or null. Numerical input is also just passed as a string too.

To accommodate this request, I’d almost have to add a ?kwargs_format=json or something as an additional variable so that after it parses your GET Parameters, it passes it through a JSON parser. I’d have to think more about your request here unfortunately.

1reaction
caronccommented, Apr 28, 2022

I’m kind of siding with @dgtlmoon at this point. I’m not sure how much more granular we should get here. Apprise meant to relay data to any end-point you want.

The custom JSON endpoint is already pretty feature rich now; especially with the last merge request that allows you to complete mangle the payload. I don’t think what you’re pitching is a terrible idea, but i don’t see value in focusing in on it because i just don’t see anyone getting value out of it but you 😉 . Unless there is actually more demand, i think we should leave this very extend customization i already added as your solution. If you want to make PR to enhance it, i certainly will entertain it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced field editing using JSON | Cloud automation Cloud
Referencing issue fields. You can reference custom fields by name rather than ID. In the example below, the same field is referenced by...
Read more >
Custom JSON Examples - Informatica Documentation
These custom patterns show examples of a simple JSON view of a table for insert, update, and delete CDC events, patterns that format...
Read more >
How to write custom converters for JSON serialization - .NET
This article shows how to create custom converters for the JSON serialization classes that are provided in the System.Text.Json namespace.
Read more >
Using Custom JSON - OpsWorks - AWS Documentation
You can declare custom JSON at the deployment, layer, and stack levels. You may want to do this if you want some custom...
Read more >
JSON | PyCharm Documentation - JetBrains
If your configuration file has a custom name or you are working with a scratch file, click No JSON schema on the Status...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found