add JSONEncodedObj from https://gist.github.com/dbarnett/1730610.  thank you @dbarnett!