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
325 stars 48 forks source link

Newline before closing brace in json output #62

Closed afengler closed 5 years ago

afengler commented 6 years ago

libxo seems to be creating a newline before the last closing brace when doing non-pretty json output:

% uptime --libxo json
{"uptime-information": {"time-of-day":" 5:03PM","uptime":25201,"days":0,"hours":7,"minutes":0,"seconds":31,"uptime-human":" 7 hrs,","users":9,"load-average-1":0.41,"load-average-5":0.36,"load-average-15":0.34}
}

This is manifesting on all libxo tools I've tested on multiple versions of FreeBSD, up to 12-ALPHA6

philshafer commented 6 years ago

Yes; easily duplicated. Thanks...

philshafer commented 5 years ago

Fixed in the "develop" branch