Closed jtagcat closed 2 years ago
If you use a filter of json:$*
it should select all and re-format, does it work?
also, shoot me a example URL so i can check the content-type headers etc
json:$*
Good idea.
Previous version showed. A system-error occurred when validating your JSONPath expression
. There was no meaningful entry in docker logs. When updating to today's version, it almost worked.
As defined in the docs, $*
gives all values in a tree (excluding keys). Using json:$
works.
Although, I'd expect indented to be the default, auto-detected. As it looks like too much work, a small 'if you want indented, use this' in the docs sounds better.
I'm not sure if adding it under https://github.com/dgtlmoon/changedetection.io/wiki/JSON-Selector-Filter-help would be best, as the title says filtering-filtering, but people searching will might be turned away by it. Never minding that, as a starting point, I've added it there.
More likely is that it isn't in a visible place, and people will not have the idea to search for it, just having poorer diffs.
Reopen if you have any ideas, or want to keep the issue tracked.
@jtagcat
also, shoot me a example URL so i can check the content-type headers etc
this would help a lot
Ahh, forgot, pardon.
I used https://api.github.com/graphql
Headers: Authorization: bearer <gh token>
Body:
{
"query": "query { organization(login:\"tailscale\") { repositories(first:5, orderBy:{field:CREATED_AT, direction:ASC}) { edges { node { name }}}}}"
}
(this is also possible:)
- first:5,
+ first:5, isFork:false,
https://api.github.com/repos/dgtlmoon/changedetection.io should work as an easier example.
Is your feature request related to a problem? Please describe. GitHub GraphQL API, like many others, responds with no indentation. This makes diffs visually hard to look at.
Describe the solution you'd like Prettify / Indent JSON responses before diffing / saving.
Describe the use-case and give concrete real-world examples Current diff:
Desired:
Showing 'one node object was added, and last was removed' would be nicer, but that's likely too much to ask.