Is anything particular that jansson offers for this case compared with the internal srjson (which is based on cjson lib), see src/core/utils/srjson.{c,h} ?
Dialog module already uses srjson for profile storage and you can use srjson either with system malloc or internal memory.