For my process, I use pythonCaller and I have a JSON-type attribute. However, since the setAttribute function doesn’t recognize the JSON type, I have to use json.dumps() to convert the JSON into a string. I then connect a featureWriter to the output of pythonCaller to write the result in JSON format. However, I don’t understand why the featureWriter reformats the JSON on input. How can I have a correct json format
Here is an example of the file from featureWriter
s
{
"result_json" : ""{\"millesime\": e{\"2022\": {\"echelles\": {\"Y\": {\"max\": \"20.39\", \"min\": \"18.11\"}, \"X\": {\"max\": 461.0, \"min\": 0}}, \"resultats\": s{\"distance\": 0, \"pixel_value\": \"20.39\"}, {\"distance\": 425.0, \"pixel_value\": \"19.76\"}, {\"distance\": 265.0, \"pixel_value\": \"19.4\"}, {\"distance\": 461.0, \"pixel_value\": \"18.11\"}]}}, {\"2023\": {\"echelles\": {\"Y\": {\"max\": \"2039\", \"min\": \"1811\"}, \"X\": {\"max\": 461.0, \"min\": 0}}, \"resultats\": s{\"distance\": 0, \"pixel_value\": \"2039\"}, {\"distance\": 425.0, \"pixel_value\": \"1976\"}, {\"distance\": 265.0, \"pixel_value\": \"1940\"}, {\"distance\": 461.0, \"pixel_value\": \"1811\"}]}}], \"project_name\": \"Fecamp\"}]"
}
]