Skip to main content
Archived

JSON Writer options

Related products:Transformers
  • February 15, 2018
  • 1 reply
  • 1 view
k_lander
  • k_lander
    k_lander

Currently the JSON writer (or via the FeatureWriter) writes an array. It would be nice to have the option to not assume you want an array. As an example I was working through something where I would use an HTTPcaller to get a token from a REST API of a particular service. Since this token doesn't expire for about 24 hours, I don't need to keep requesting a new token, so I wanted to write this info. to a JSON and then use that file as the Upload Body for another HTTPcaller. However the [square brackets] were getting in the way! I can hack my way around it by using the CSV or Text File writer to write the .json file in the correct syntax, but that just sounds so wrong :) I can also read the JSON file and clean up those brackets before sending the data, but again...just trying to cut down on unnecessary steps.

This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

david_r
Celebrity
  • February 16, 2018

What should the writer do if it receives more than a single feature?

A common workaround for t his case would be to use the JSONTemplater and the TEXTFILE writer, that way you have full control over what's being generated.


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