support jansson strings with lengths, as per jansson 2.5.1, without losing backcompat
see pending jansson changes at https://github.com/akheron/jansson