Bingen Galartza Iparragirre created an issue |
GetFeatureInfo documentation example template generates invalid JSON |
Issue Type: |
Bug |
---|---|
Affects Versions: |
2.19.2 |
Assignee: |
Unassigned |
Components: |
Documentation |
Created: |
30/Aug/21 1:38 PM |
Priority: |
Lowest |
Reporter: |
The sample template in the GetFeatureInfo Geojson templating documentation might generate invalid JSON output. The condition for adding the comma separators is not good enough, as it might add a comma when the next attribute is a geometry. That will make some json parsers to crash. A simple fix would be to use If you need to skip certain element in a list, it’s generally a bad idea to use if directive for that, because then <#sep>, item?has_next, item?counter, item?index, item?item_parity, etc., will not be usable, as FreeMarker doesn’t know what items were and will be actually displayed. Instead, you should try to remove the unwanted items from the sequence that you will list, and then list it (since 2.3.29). Here are some typical examples with and without if. So, I suggest to change the Unable to find source-code formatter for language: text. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
to this: Unable to find source-code formatter for language: text. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
|
Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS |
|
This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100175-sha1:61f0814) |