Lots (just some? most? I haven't really used it much) of FreeBSD system utilities are using libxo for output, so you can use e.g.
ps --libxo json
and get json output, or xml/html ps --libxo json
and get json output, or xml/html