cancel
Showing results for 
Search instead for 
Did you mean: 

JSON Generation using JSON Generator

Aravind711
New Contributor II

Hi All,

I need the below structure for creating a Tree structure in Javascript, When i execute the below structure using JSON generator (Edit JSON) am not getting any output neither error

[{

“text”: “Years”,

	"nodes": [{
		"text": $year,
		"nodes": [{
				"text": $quarter,
				"nodes": [{
					"text": $month
				}]
			}

		]
	}]
}

]

Can anyone please explain what am i missing in it.

Thanks,
Aravind

6 REPLIES 6

dmiller
Former Employee

Do you have $year, $quarter, and $month defined elsewhere in the pipeline?

If I use what you have here in a standalone JSON Generator, I get the following error:

Failure: Failed to validate the output, Reason: Unrecognized token ‘$year’: was expecting (‘true’, ‘false’ or ‘null’), Resolution: Verify that the table values and the template are correct.

If I put a Mapper before it to define $year, $quarter, and $month with some temporary values, the output of the JSON Generator is the tree structure with the temp values.


Diane Miller

Aravind711
New Contributor II

Yes @dmiller, I have the values for the Year, Quarter and month in the mapper snap, but when i execute i don’t receive error or either the output, can you please share you pipeline and the output image

dmiller
Former Employee

Here is my test pipeline.

JSON Generator Test_2017_12_19.slp (5.1 KB)


Diane Miller

Aravind711
New Contributor II

Thanks for sharing Dmiller, will try and let you know on the update