Reviewer Rob - Make val_json() easier to use

This unifies most of the val_json() code into cpp-common.  The other half of this change will come once this is merged.