[1] Google. Protocol Buffers: JSON Mapping. [2] OpenStreetMap. PBF Format Specification. [3] Protocol Buffers GitHub – json_format.py .
First, install the library:
To get a raw JSON representation of the OSM data:
npm install osm-pbf-parser through2 JSONStream