Sorry about the inconvenience. The reason it is failing is because the json does not have "geometryType" defined in the "featureSet" element.here is the correct one (please see the attachment for the entire json)
...
"featureSet": {
"geometryType": "esriGeometryPolyline",
"features": [
{
...
Apparently it was missing from the help. We will update the help as well as put an example. Thanks for your comment.Quick question: may I ask why are you constructing the JSON manually instead of relying on PrintTask of any of Web APIs?