Skip to main content
Solved

jsontemplater - help needed for beginner

  • August 19, 2014
  • 1 reply
  • 51 views

Forum|alt.badge.img
Hi,

 

 

I am following the example of the village that can be found here: http://docs.safe.com/fme/html/FME_Transformers/Default.htm#Transformers/jsontemplater.htm

 

 

my root is the following:

 

 

{

 

    "title": "Atlas de l'immigration - Exemple d'atlas dynamique",

 

    "layers": [

 

        fme:process-features("LAYERS"),

 

    ]

 

}

 

 

my sub names LAYERS is the following:

 

{

 

    "name": fme:get-attribute("fme_basename"),

 

}

 

 

However I got this error:

 

|JSONTemplater(XMLTemplaterFactory):The following error occurred near line 5, column 5 of the query:

 

|JSONTemplater(XMLTemplaterFactory): invalid expression: syntax error, unexpected "]"

 

 

I thought I was following the doc example carefuly. Why this error?

 

Best answer by david_r

Hi,

 

 

you must remove your comma at the end of line 4, as well as on line 2 of the LAYERS sub.

 

 

David
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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
  • Best Answer
  • August 19, 2014
Hi,

 

 

you must remove your comma at the end of line 4, as well as on line 2 of the LAYERS sub.

 

 

David