Opened 6 years ago

Last modified 6 years ago

#19632 closed enhancement

[PATCH] Try to convert keys to json values prior to saving — at Initial Version

Reported by: taylor.smock Owned by: team
Priority: normal Milestone: 20.08
Component: Core Version:
Keywords: Cc:

Description

{
    "type": "FeatureCollection",
    "generator": "JOSM",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "array": "[\"obj1\", \"obj2\"]",
                "dict": "{"\key1\": \"value1\"}"
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    0,
                    0
                ]
            }
        }
    ]
}

vs.

{
    "type": "FeatureCollection",
    "generator": "JOSM",
    "features": [
        {
            "type": "Feature",
            "properties": {
                "array": ["obj1", "obj2"],
                "dict": {"key1": "value1"}
            },
            "geometry": {
                "type": "Point",
                "coordinates": [
                    0,
                    0
                ]
            }
        }
    ]
}

Change History (1)

by taylor.smock, 6 years ago

Attachment: 19632.patch added

Try to use JsonValues when it makes sense (try to parse the tag value, falls back to JsonString of the value)

Note: See TracTickets for help on using tickets.