JSON API #381
Replies: 7 comments 17 replies
-
I suggest the following:
Here are a couple of examples of the current output, and how it would look like in JSON:
|
Beta Was this translation helpful? Give feedback.
-
I'd think it could be helpful to have some use case descriptions. How would you like to use |
Beta Was this translation helpful? Give feedback.
-
I think we need to discuss how we should build the JSON, do we push each update (ping reply) to the console as its own JSON object and expect the receiving script/program to process that as an independent JSON chunk, or do we write it as a simple JSON object that is streamed to the user. I'll explain the differences as a whole Is not parsable as a JSON object. However, each line is. The alternative is to stream it as a JSON array, for example [{"resp": {"host": "1.1.1.1", "seq": 0, "size": 64, "rtt": 13.5, "rttAvg": 13.5, "loss": 0}}, Which is absolutely parsable, however! Its only parsable as a complete object, so once it finishes. Food for thought. |
Beta Was this translation helpful? Give feedback.
-
By the way another use case is errors. Those could also be surfaced as "error" events. |
Beta Was this translation helpful? Give feedback.
-
Just FYI, here is my JSON implementation working in production :) |
Beta Was this translation helpful? Give feedback.
-
Pull request #386 has shown that we need to specify how to handle missing values. This pertains to at least "verbose host summary" lines if there have been timeouts, and failure to read TTL/Hop Count and/or TOS/TC byte. I would suggest to use the JSON
What would work best for potential users of JSON output from |
Beta Was this translation helpful? Give feedback.
-
The JSON output is now available in the develop branch. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
The new JSON API for fping will be discussed in this section.
There are currently 3 versions, which are partly based on each other
The best version is #380 on which the discussion should be based.
Topics
@schweikert
More content to follow
Beta Was this translation helpful? Give feedback.
All reactions