Question

Using JSONTemplater for the first time and i keep getting an error message saying ':Downtown" : pair with the same name already exists in object', and not sure how to solve this.

  • 13 January 2023
  • 4 replies
  • 2 views

image


4 replies

Userlevel 2
Badge +17

Hello @sharminn​ 

Usually this error means another JSON object with the same name (eg. Downtown) already exists in the output JSON. Are you able to share your workspace along with a small example of your input data?

Hello @debbiatsafe​ 

Thank you for responding, i was following the following guide from FME, https://community.safe.com/s/article/json-writing-with-jsontemplater

and below is the input data i believe in JSON, and my workbench.

 

imageimagethanks for responding!

Userlevel 2
Badge +17

Hello @debbiatsafe​ 

Thank you for responding, i was following the following guide from FME, https://community.safe.com/s/article/json-writing-with-jsontemplater

and below is the input data i believe in JSON, and my workbench.

 

imageimagethanks for responding!

Hello @sharminn​ 

I tried following the instructions in the article and was able to successfully create a nested JSON file. You may have a typo in the JSONTemplater or another transformer elsewhere in the workspace is misconfigured, causing the error.

Are you able to share the workspace you currently have?

Hello @sharminn​ 

I tried following the instructions in the article and was able to successfully create a nested JSON file. You may have a typo in the JSONTemplater or another transformer elsewhere in the workspace is misconfigured, causing the error.

Are you able to share the workspace you currently have?

Yes you were right, i've just been through it again, and it's the sampler transformer that i hadn't got the right parameters stated. Thank you so much, it works fine now 😊

Reply