Move test.
More checks.
Rename _get_* to _json_*

More accurately reflect what these functions are for.
Rewrite. Not tested.

Probably will break badly.

In other news, rumour is that Marry had a little lamb, and its fleece
was white as snow.
Move function to better place.

Function can be better cared for when around other _json_ functions.
Remove obsolete function
Improve error message for bad parameters
Fix parameter errors.