Skip to main content
Question

How to deal with json and convert them to attributes to use later at the workspace

  • February 18, 2022
  • 3 replies
  • 40 views

spiderman
Contributor
Forum|alt.badge.img+7

How to convert the json to attributes so i can use it later in the workspace

part of json :

 

{

    "content": [

        {    

            "id": "89732" ,

....................................

 

i have used jsonflattener but i found that i got missing data .

Thanks in advance

FME 2020.2

3 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

Another one to try would be the JSONFragmenter (I always mix those two up). Try this as query:

json[*][*]

And set it to flatten query results into attributes.

 

Can you share what you have tried so far?


spiderman
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 18, 2022
redgeographics wrote:

Another one to try would be the JSONFragmenter (I always mix those two up). Try this as query:

json[*][*]

And set it to flatten query results into attributes.

 

Can you share what you have tried so far?

Thanks .it is working , this method shows id and other items but i have inside the json content  also"geometry":{"coordinates":[x,y],"type":"Point"}

 

but i got missing when i want to show coordinates .what should i do ?

 

 


redgeographics
Celebrity
Forum|alt.badge.img+50
spiderman wrote:

Thanks .it is working , this method shows id and other items but i have inside the json content also"geometry":{"coordinates":[x,y],"type":"Point"}

 

but i got missing when i want to show coordinates .what should i do ?

 

 

It would really help if you could post the full json structure here.

 

Also... if you have the json in an attribute and want to build the geometry that's in there you can simply use the GeometryReplacer, set it to GeoJSON as geometry type. Assuming whoever designed the structure didn't find a create way of storing the geometry it should work.


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