[CHEF-3863] Reimplement json_class in a constrained way not vuln to DoS

:rage: