JSON.generate fails if it is passed a Chef::Node::Attribute instance. 

Call #to_hash to ensure it always receives a hash.