fossil: add json and tcl options

Closes #22020.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>