Parsing stdout with custom format or standard format?

Posted by linquize on Programmers See other posts from Programmers or by linquize
Published on 2012-11-17T13:02:19Z Indexed on 2012/11/17 17:21 UTC
Read the original article Hit count: 326

Filed under:
|
|
|
|

To integrate with other executables, a executable may launch another executable and capture its output from stdout.

But most programs writes the output message to stdout in custom format and usually in human readable format.

So it requires the system integrator to write a function to parse the output, which is considered trouble and the parser code may be buggy.

Do you think this is old fashioned? Most Unix-style programs do that.

Very few programs write to stdout in standard format such as XML or JSON, which is more modern. Example: Veracity (DVCS) writes JSON to stdout.

Should we switch to use modern formats? For a console program, human readable or easy parsable: which is more important ?

© Programmers or respective owner

Related posts about Xml

Related posts about JSON