@domcleal, this json encoding was the thing that tripped me up in the beginning.  My goal was not to change class PuppetClassImporter which also uses JSON.parse in it's method.  Let's add a re-factor issue rather than trying to change it on this PR.