Juniper / libxo

The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.
http://juniper.github.io/libxo/libxo-manual.html
BSD 2-Clause "Simplified" License
314 stars 47 forks source link

FreeBSD's json format prints an unescaped new line before the final closing bracket #74

Closed jlduran closed 3 years ago

jlduran commented 4 years ago

FreeBSD's --libxo json format prints an unescaped new line before the final closing bracket. Here is an example with a short output (jls with no jails, any other command will do):

% jls --libxo json
{"__version": "2", "jail-information": {"jail": []}
}

Notice the closing bracket in a new line (unescaped). The tests in libxo do not seem to include it. I am not sure if this is intended.

philshafer commented 4 years ago

Not intentional. Off hand, that looks like just a bug.

Thanks, Phil

On Aug 4, 2020, at 3:11 PM, Jose Luis Duran notifications@github.com wrote:

FreeBSD's --libxo json format prints an unescaped new line before the final closing bracket. Here is an example with a short output (jls with no jails, any other command will do):

% jls --libxo json {"__version": "2", "jail-information": {"jail": []} } Notice the closing bracket in a new line (unescaped). The tests in libxo do not seem to include it. I am not sure if this is intended.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Juniper/libxo/issues/74, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAROIOE55VVLCRUELYITW2LR7BMP5ANCNFSM4PUWYAXQ.

jlduran commented 3 years ago

This bug is not present in FreeBSD 13.