Skip to main content
Solved

fme json template

  • February 19, 2014
  • 3 replies
  • 29 views

Forum|alt.badge.img
In this article you show how to create a JSON template from attributes,

 

 

http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/jsontemplater.htm

 

 

But I have some values that are in Published Parameters. How would I get those?

 

 

I don't see an XQUERY request for that:

 

 

http://docs.safe.com/fme/html/FME_Transformers/Default.htm#XQuery/XQuery_functions.htm

Best answer by dr_ysg

I got an answer from De Wet van Niekerk @ SAFE support:

 

 

This isn't exactly XQuery, but you can use the standard FME macros, such as $(PUBLISHED_PARAM_HERE), and it will work in the JSONTemplater. Here's a screenshot of how it is inserted into the template: http://screencast.com/t/MiKC2GzlU

 

 

 

View original
Did this help you find an answer to your question?
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.

3 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • February 20, 2014
Hi,

 

Have you tried feaching them with the ParameterFetcher?

Forum|alt.badge.img
  • Author
  • February 20, 2014
The Parameter already exists in the workspace, but I did see that I could use the AttributeCreator and then fill in the value from the Published Parameters. Now my issue (minor) is that the values are all quoted strings, even booleans as well as integer and float values. But it is a minor issue for the Node.JS server that I have written.

 

 


Forum|alt.badge.img
  • Author
  • Best Answer
  • February 24, 2014
I got an answer from De Wet van Niekerk @ SAFE support:

 

 

This isn't exactly XQuery, but you can use the standard FME macros, such as $(PUBLISHED_PARAM_HERE), and it will work in the JSONTemplater. Here's a screenshot of how it is inserted into the template: http://screencast.com/t/MiKC2GzlU

 

 

 


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