pinJSON() in jsontools.php refactored and overloaded.