New functions to transform a non-Numpy Python value to JSON.