Open Raruto opened 3 months ago
Null values are converted to string when sent to HTTP response (formatter: 1) causing an inconsistent handling in JS code:
formatter: 1
"formatter": 1
// outputs: "NULL" fetch('https://v37.g3wsuite.it/vector/api/data/qdjango/97/buildings_2f43dc1d_6725_42d2_a09b_dd446220104a/', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "field": "type|eq|Administrative", "formatter": 1, }), }).then(d => d.json()).then(d => console.log(d.vector.data.features[4].properties.subtype))
"formatter": 0
// outputs: null fetch('https://v37.g3wsuite.it/vector/api/data/qdjango/97/buildings_2f43dc1d_6725_42d2_a09b_dd446220104a/', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "field": "type|eq|Administrative", "formatter": 0, }), }).then(d => d.json()).then(d => console.log(d.vector.data.features[4].properties.subtype))
[g3wsdk.info]
https://v37.g3wsuite.it/en/map/demo-37/
No response
Checklist
Subject of the issue
Null values are converted to string when sent to HTTP response (
formatter: 1
) causing an inconsistent handling in JS code:Steps to reproduce
"formatter": 1
"formatter": 0
Environment
[g3wsdk.info]
Link to your project
https://v37.g3wsuite.it/en/map/demo-37/
Additional info
No response