logoalt Hacker News

mtucker502yesterday at 12:32 PM1 replyview on HN

The properties key is plural but contains a dictionary. Does the schema allow for this to be a list?


Replies

kijinyesterday at 1:22 PM

Nope, properties must be an object (dictionary or null). Which means each property can only appear once.

The spec doesn't say what type the value of a property can be, though. Examples in the RFC show strings, floats, and a nested object. So you could probably put a list in there as well if you want to store multiple values under the same key, provided that your decoder knows what to do with such values. (GeoJSON is often converted to and from WKB/WKT, and unorthodox values may be lost in the conversion.)