[MapServer-users] wfs array attributes as json arrays

Carlos Padron Florez carlos.padron at gigaclear.com
Fri Jan 19 03:46:52 PST 2024


Hi,

Is there a way to configure a WFS so when it is requested a application/json, and one of the attributes happens to be a string array, it returns for that attribute a json array and not a SQL array as a string ?
Let me expand. Now I get something like this:
"attribute": "{value1, value2}"
I'd prefer this:
"attribute": ["value1", "value2"]

These are extracts from my mapfile that handles the json output:

    OUTPUTFORMAT
        NAME "application/json"
        DRIVER "OGR/GEOJSON"
        MIMETYPE "application/json"
        FORMATOPTION "FORM=SIMPLE"
        FORMATOPTION "STORAGE=memory"
        FORMATOPTION "FILENAME=result.json"
    END

    WEB
        METADATA
      ... other details
            "wfs_getfeature_formatlist" "OGRGML,application/json"
        END
    END

Kind regards

Carlos Padrón, MRes | Geomatics Team Lead



D: 01865 664120  W: www.gigaclear.com<http://www.gigaclear.com/>





[signature_261337870]

Gigaclear ltd, Building 1, Wyndyke Furlong, Abingdon, Oxfordshire, OX14 1UQ

Gigaclear plc is registered in England and Wales with company number 07476617


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20240119/c0e6e5a2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-signature_.png
Type: image/png
Size: 10923 bytes
Desc: Outlook-signature_.png
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20240119/c0e6e5a2/attachment-0001.png>


More information about the MapServer-users mailing list