support jansson strings with lengths, as per jansson 2.5.1

... and without losing backcompat.  :)  cf https://github.com/akheron/jansson