LIBXO(3)

πŸ“¦
version 1.7.5 Β· 2 versions
, in epel 9, fedora 43, fedora 44, nixpkgs unstable

πŸ’– LIBXO(3) πŸ’–

okay bestie, this is the libxo(3) manual page β€” Library Functions Manual energy, and today we're talking about exactly two functions. they're little. they're powerful. they're iconic.


🌸 NAME 🌸

xo_set_version, xo_set_version_h β€” record content-version information in encoded output

like... they literally just write down which version of the data you're looking at. that's the whole gig. and it slays.


πŸ“š LIBRARY πŸ“š

library "libxo"

yep. that's the one. the library. πŸŽ€


✨ SYNOPSIS ✨

#include <libxo/xo.h>

void
xo_set_version(const char *version);

void
xo_set_version_h(xo_handle_t *xop, const char *version);

two functions. two voids. zero returns. we love a no-strings-attached situation. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

so, the xo_set_version function records a version number that gets emitted as part of the data β€” but only for the encoding styles XML and JSON. the other styles don't get the version, no cap.

this version number is lowkey perfect for tracking changes in the content, which means whoever's consuming your data can actually tell which version of the data model is in use. it's giving "read the room, but also read the version field." πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

go read those too, bestie. they're the main characters of this friend group.


⭐ HISTORY ⭐

the libxo library first appeared in FreeBSD 11.0. a legend was born. πŸ’«


🫢 AUTHORS 🫢

libxo was written by Phil Shafer <phil@freebsd.org>. thank you for your service, king. πŸ‘‘


🌈 ADDITIONAL DOCUMENTATION 🌈

FreeBSD uses libxo version 1.7.5. the complete documentation can be found on github:

https://juniper.github.io/libxo/1.7.5/html/index.html

libxo lives on github as:

https://github.com/Juniper/libxo

and the latest release of libxo is available at:

https://github.com/Juniper/libxo/releases

go click. go read. go be informed. πŸ“–βœ¨


πŸ’œ HISTORY πŸ’œ

the libxo library was added in FreeBSD 11.0. (yes, again. it's said twice in the original and we respect the lore. ✨)


πŸŽ€ AUTHOR πŸŽ€

Phil Shafer


okay that's the whole page, bestie, and it's a wrap!! πŸ’– this was the LIBXO(3) page from Debian, dated December 4, 2014 β€” shoutout to that date for being the origin story of this whole vibe. periodt. πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from