FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix JSON encoding by kdubuc · Pull Request #100 · MapServer/tinyows · GitHub

Fix JSON encoding - #100

Merged
jmckenna merged 2 commits into
MapServer:mainfrom
SDIS62:main
Dec 1, 2022
Merged

Fix JSON encoding#100
jmckenna merged 2 commits into
MapServer:mainfrom
SDIS62:main

Conversation

kdubuc commented Nov 16, 2022

Copy link
Copy Markdown
Contributor

We experimenting bugs with JSON encoding. Double quote were not escaped correctly. GeoJSON was incorrect, while XML response was OK.

Example :

{
    "type": "FeatureCollection",
    "crs": {
        "type": "name",
        "properties": {
            "name": "urn:ogc:def:crs:EPSG::4326"
        }
    },
    "features": [
        {
            "type": "Feature",
            "properties": {
                "id": 1,
                "codepostal": 62300,
                "temperature": 11,
                "nom": \"lens\"}, "geometry":{"type":"Point","bbox":[2.831830,50.428930,2.831830,50.428930],"coordinates":[2.83183,50.42893]}}
,{"type":"Feature", "properties":{"id": 2, "codepostal": 62880, "temperature": 12, "nom": \"vendin\"}, "geometry":{"type":"Point","bbox":[2.865986,50.475517,2.865986,50.475517],"coordinates":[2.865986,50.475517]}}
,{"type":"Feature", "properties":{"id": 3, "codepostal": 62680, "temperature": 14, "nom": \"mericourt\"}, "geometry":{"type":"Point","bbox":[2.866865,50.401526,2.866865,50.401526],"coordinates":[2.866865,50.401526]}}
,{"type":"Feature", "properties":{"id": 4, "codepostal": 62000, "temperature": 13, "nom": \"arras\"}, "geometry":{"type":"Point","bbox":[2.777535,50.291002,2.777535,50.291002],"coordinates":[2.777535,50.291002]}}
,{"type":"Feature", "properties":{"id": 5, "codepostal": 20000, "temperature": 24, "nom": \"ajaccio\"}, "geometry":{"type":"Point","bbox":[-74.005941,40.712784,-74.005941,40.712784],"coordinates":[-74.005941,40.712784]}}
]}

We propose this PR to fix that.

Copy link
Copy Markdown
Member

looks acceptable here, thanks @kdubuc

jmckenna merged commit 1e61f2b into MapServer:main Dec 1, 2022
jmckenna added this to the 1.2.1 milestone May 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL