Restructuration of my JSON template

Six Stars

Restructuration of my JSON template

Hi everybody,

 

I show you my problem :

 

- I would like to have this json template filled in with values :

 

image.png

 

and right now, I have this :

 

image.png

 

In fact, I would like to make a transformation of my JSON template.

 

My job is :

 

image.png

 

My tFileInputJSON_3 is :

 

image.png

 

My row11 is :

 

image.png

 

My tWriteJSONField_2 is :

 

image.png

 

My row12 is :

 

image.png

 

My tFileOutputJSON_1 is :

 

image.png

 

Actually all the content is in this label "summary" :

"summary": "{\"fields\":{\"project\":{\"key\":\"TRL\"},\"Summary\":[\"Product\",\"Pouvoir générer des par défaut. \\n\"],\"description\":[\"bak\",\"boom\"],\"issuetype\":{\"name\":[\"Task\"]},\"reporter\":{\"name\":[[\"562\"],[\"562dd\"]]},\"assignee\":{\"name\":[]},\"labels\":[\"Module\",\"Correos\"]}}",

I would like to dispatch the contents across these labels :

 

image.png

But these are at null. Why ? Could you give me some clues to resolve It ?

Thanks,

Alex

 


Accepted Solutions
Six Stars

Re: Restructuration of my JSON template

Hi Talend community,

 

Finally, I succeeded to resolve my problem :

 

image.png

 

My input json looks like :

 

image.png

with these settings :

image.png

In my tWriteJSONField_3, I have this structure :

image.png

 

my tJavaRow is to transform some data (labels in JSON array) and so forth ...

 

In conclusion I have in my tFileOutputDelimited_2 :

 

image.png

 

The file produced is :

 image.pngIt's better if the JSON string pass the JSONLint ...

 

 

Here It is !

 

Now I have an other question but I think to develop it in a other topic

 

Alex

 


All Replies
Moderator

Re: Restructuration of my JSON template

Hello,

What does your input json file look like?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: Restructuration of my JSON template

Hi Talend community,

 

Finally, I succeeded to resolve my problem :

 

image.png

 

My input json looks like :

 

image.png

with these settings :

image.png

In my tWriteJSONField_3, I have this structure :

image.png

 

my tJavaRow is to transform some data (labels in JSON array) and so forth ...

 

In conclusion I have in my tFileOutputDelimited_2 :

 

image.png

 

The file produced is :

 image.pngIt's better if the JSON string pass the JSONLint ...

 

 

Here It is !

 

Now I have an other question but I think to develop it in a other topic

 

Alex

 

Moderator

Re: Restructuration of my JSON template

Hello,

Thanks for your feedback and sharing your solution with us. Feel free to create a new topic on forum for your another question.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: Restructuration of my JSON template

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads