From cb6bdec17fc0fff8c99810d0ef7ca7c4c2c516a2 Mon Sep 17 00:00:00 2001 From: Gabriel Gressier <75422446+GabGr25@users.noreply.github.com> Date: Wed, 16 Nov 2022 10:48:22 +0100 Subject: [PATCH] Update wfs_get_feature.c --- src/wfs/wfs_get_feature.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/wfs/wfs_get_feature.c b/src/wfs/wfs_get_feature.c index 71eb19b..261d418 100644 --- a/src/wfs/wfs_get_feature.c +++ b/src/wfs/wfs_get_feature.c @@ -545,13 +545,9 @@ static buffer *wfs_retrieve_sql_request_select(ows * o, wfs_request * wr, buffer } /* Columns are written in quotation marks */ else { - if (wr->format == WFS_GEOJSON) - buffer_add_str(select, "to_json("); buffer_add_str(select, "\""); buffer_copy(select, an->key); buffer_add_str(select, "\""); - if (wr->format == WFS_GEOJSON) - buffer_add_str(select, ")"); } if (an->next) buffer_add_str(select, ","); @@ -857,10 +853,11 @@ static void wfs_geojson_display_results(ows * o, wfs_request * wr, mlist * reque else buffer_add_str(prop, ", \""); buffer_copy(prop, an->key); - buffer_add_str(prop, "\": "); + buffer_add_str(prop, "\": \""); value_enc = buffer_encode_json_str(PQgetvalue(res, i, j)); buffer_copy(prop, value_enc); buffer_free(value_enc); + buffer_add(prop, '"'); } }