Keys of health check result json are complex strings instead of json #630
-
|
Hi, maybe I've missed something, but the keys in the json structure of the health check results are strings that are really ugly to parse, i.e. "Database(alias='default')". Is there are reason that those aren't proper json expressions or is there a way to parse them? Thanks for any hints. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
|
Hi @christianwgd 👋, Thanks for reaching out. I guess the big question is, what is proper? They are keys; hence, they need to be a string. They need to be unique, in case someone adds multiple databases. We just rolled with If you have suggestions for improvement, send them my way. There isn't much logic behind it, except that it is built in and keeps the package complexity low. Cheers! |
Beta Was this translation helpful? Give feedback.
I wonder, why do the labels matter so much? Yes, they contain some identifiable information, but they are not meant as structured data.
To be honest, my current suggestion would be subclassing and implementing different
__repr__methods. Something like:However, I don't really want to change how Python decides to represent dataclasses and this package provides health checks and isn't a monitoring suite. This might go beyond the scope of this package.