Skip to main content

How can i extract data from this line? 

 

{"sl:stand": {"sl-bag-extract:bagObject": {"Objecten:Pand": {"Objecten:status": "Pand in gebruik", "Objecten:geometrie": {"gml:Polygon": {"@srsName": "urn:ogc:def:crs:EPSG::28992", "gml:exterior": {"gml:LinearRing": {"gml:posList": {"#text": "114062.419 542728.035 0.0 114067.343 542726.792 0.0 114067.637 542728.082 0.0 114068.445 542728.468 0.0 114069.011 542730.438 0.0 114068.36 542731.246 0.0 114068.639 542732.471 0.0 114063.762 542733.793 0.0 114064.204 542735.512 0.0 114057.619 542737.161 0.0 114055.721 542729.372 0.0 114055.572 542729.428 0.0 114053.081 542719.589 0.0 114059.937 542717.727 0.0 114062.353 542727.763 0.0 114062.419 542728.035 0.0", "@count": "16"}}}, "@srsDimension": "3"}}, "Objecten:voorkomen": {"Historie:Voorkomen": {"Historie:BeschikbaarLV": {"Historie:tijdstipRegistratieLV": "2010-11-26T12:31:16.436", "Historie:tijdstipEindRegistratieLV": "2014-10-27T12:32:20.904"}, "Historie:eindGeldigheid": "2014-09-25", "Historie:beginGeldigheid": "1930-10-17", "Historie:eindRegistratie": "2014-10-27T12:00:33.000", "Historie:tijdstipRegistratie": "2010-11-26T12:11:13.000", "Historie:voorkomenidentificatie": "1"}}, "Objecten:documentdatum": "1930-10-17", "Objecten:geconstateerd": "N", "Objecten:identificatie": {"#text": "0366100000006739", "@domein": "NL.IMBAG.Pand"}, "Objecten:documentnummer": "BV 100", "Objecten:oorspronkelijkBouwjaar": "1935"}}}}

 

It depends on what info you want exactly.

Transformers generally used for JSON extracting:

  • JSONExtractor
    • Extract specific portions to attributes.
  • JSONFlattener
    • Flattens objects, extracting keys and values to attributes. You will need to expose these attributes as they are unexposed.
  • JSONFragmenter
    • Extract specific portions to features.

Try a JSONExtractor followed by a JSONFlattener:

Remember to expose the attributes you need in the JSONFlattener.


Thanks for the help, i'm still don't get there.

 


Attached sample workspace.

 


Thanks for the help, i'm still don't get there.

 

One quick remark: FME is case sensitive when it comes to attribute names. So you have set Objecten_pand in the JSONExtractor but then refer to Objecten_Pand in the JSONFlattener


Attached sample workspace.

 

Great job


Tanks everybody