Skip to main content
Question

list

  • May 27, 2025
  • 1 reply
  • 41 views

magda_cz
Contributor
Forum|alt.badge.img+2

Hi all,

I have .shp data sets (100+) which I read with feature reader. The attributes’ values are saved as list ,attribute “ID” for shopA.shp has values as {0, 2, 4, 8} and another attribute “Desc_”: {cake, bread, drink}, my aim is to save them as json file so the json will look:

{
   "uuid" : "1b2299d1-b97a-48d9-9a99-9994491ebb34",
   "path_directory_windows" : "O:\\M\\A\\B\\",
   "members" : [
      {
         "base_name" : "shopA.shp",
         "created" : "20240225",
         “attributes” : [

“ID”: “long”, “0, 2, 4, 8”, min = 0, max = 8, mean = 3.5, median = 3, mode = None,

“Desc” : char(256), “cake, bread, drink”     

]
      },
      {

   "uuid" : "322299d1-b94a-48d9-9a99-99944912bb34",
   "path_directory_windows" : "O:\\M\\A\\C\\",
   "members" : [
      {
         "base_name" : "shopB.shp",
         "created" : "20240225",
         “attributes” : [

“ID”: “long”, “1, 2, 3, 4”, min = 1, max = 4, mean = 2.5, median = 2.5, mode = None,

“Desc” : char(256), “cake, orange, apple”     

]


      },

 

Thank you so much in advance.

Mag

1 reply

alexbiz
Enthusiast
Forum|alt.badge.img+12
  • Enthusiast
  • May 27, 2025

Hi Magda,

If you're looking for how to create custom JSON from your features, I would suggest you to check out the JSONTemplater transformer.

This article might help : 

https://support.safe.com/hc/en-us/articles/25407515416589-Writing-JSON-with-the-JSONTemplater

 


Reply


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