Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

JoltTransformation unable to marshal json


Unable to solve this issue.


The process works with the Advance editor



    "operation": "shift",
    "spec": {
      "@.source": "header.source",
      "": "",
      "@.publishedAt": "",
      "@.title": "header.title",
      "@.description": "header.description",
      "@.urlToImage": "header.image",
      "@.url": "header.url",
      "@": "source"
    "operation": "default",
    "spec": {
      "header": {
        "type": "News",
        "ingestMethod": "NiFi",
        "injestionMethod" : "${methodName}",
        "injestionUrl" : "${url}${searchQuery}${apiKey}${fromDate}${domains}",

the feed coming from a JsonSplit

"source": {
"id": "abc-news-au",
"name": "ABC News (AU)"
"author": "ABC Radio National",
"title": "The Talented Mr Daly",
"description": "Peter Daly projects confidence and success. He wears gold rings, gold cufflinks, and a gold watch. The market, he says, is his backyard and he knows it \"damn well\". But the 59-year-old is actually in a world of trouble. The corporate watchdog, ASIC, accuses h…",
"url": "",
"urlToImage": "",
"publishedAt": "2018-08-25T22:05:00Z"

New Contributor

Hey Lee, did you figure something out with this. I am having the exact same issue on version 1.6.x . Thanks

New Contributor

Lee, all,

We tracked down the issue to an attribute variable I was using to put into the json. It had unescaped/hidden characters (\n) that where causing the JOLT processor to fail; however like you, it would work via the "Advance Editor". I used escapeJson() on the attribute it works it also makes the \n are visible in the flowfile.

Simple Example:



"operation": "default",

"spec": {

"content": "${ext_content:escapeJson()}", <- ext_content attribute contained the issue

"date": "${ext_date}",

"updateDate": "${ext_updateDate}"




Hope this this helps and saves someone else some time!


Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.