The functions `writeCustom` and `readCustom` are available from module Text.Pandoc.Lua.
pandocVersion
pandocVersionText