mapbox / carto

fast CSS-like map stylesheets
https://cartocss.readthedocs.io/
Apache License 2.0
652 stars 129 forks source link

Support YAML MML files #401

Closed pnorman closed 8 years ago

pnorman commented 9 years ago

JSON has a number of problems that make it unsuitable for a multi-contributor style, including code review, merge conflicts, and difficulty editing. For this reason, projects have started to move towards defining their layers in YAML and converting it to JSON, or, in the case of Kosmtik, supporting reading YAML directly.

It would be useful if the carto program could read YAML directly, eliminating the need to convert YAML to JSON in order to produce Mapnik XML.

cc @yohanboniface

tmcw commented 8 years ago

I'd accept a PR for this as long as it's backwards-compatible.

yohanboniface commented 8 years ago

I'd accept a PR for this

That's somewhere on my radar, but time, priorities… ;)

as long as it's backwards-compatible.

YAML being a superset of json, that should be doable, but the devil is in the piece of code that you look for last, no? :)

pnorman commented 8 years ago

YAML being a superset of json, that should be doable, but the devil is in the piece of code that you look for last, no? :)

I was thinking we'd need to autodetect yaml vs json, but you're right, a valid json file is a valid yaml file.