Skip to main content
Question

Help with creating a nested JSON from an Excel table

  • January 31, 2025
  • 2 replies
  • 61 views

sar_copp
Contributor
Forum|alt.badge.img+4

Hello,

Is it possible to transform a table (ie from Postgresql, or Excel) into this complicated Json format within FME please? I have attached the json file and also a small dummy sample excel file (which doesnt quite have the correct column headers as its a work in progress).
I am completely new to JSON and I have done the JSON Templater tutorial but no idea how to actually apply it to my needs!!

Help wanted!!

2 replies

david_r
Evangelist
  • January 31, 2025

Looking at the supplied JSON it might be quite a bit of work, depending on how much you actually have to supply and how much is optional or static. One solution could be to forego the JSONTemplater and import the sample JSON file as the writer definition:

You will then have a JSON writer containing the necessary definition to reproduce your JSON.

However, you’ll see that you now have to contend with nested lists on several levels:

However, if you’re more comfortable working with lists it might be the easiest solution.


sar_copp
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • February 3, 2025
david_r wrote:

Looking at the supplied JSON it might be quite a bit of work, depending on how much you actually have to supply and how much is optional or static. One solution could be to forego the JSONTemplater and import the sample JSON file as the writer definition:

You will then have a JSON writer containing the necessary definition to reproduce your JSON.

However, you’ll see that you now have to contend with nested lists on several levels:

However, if you’re more comfortable working with lists it might be the easiest solution.

I’ll have a look at this ​@david_r thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings