Removing an extra .to_json call.  This was causing an empty array to be [] instead of just [].