flat_to_json
Convert OpenStreetMap tags from flat text format to JSON for AI workflows. Processes key=value pairs, handles whitespace variations, empty lines, and comments to create structured data from text exports.
Instructions
Convert OpenStreetMap tags from flat text format (key=value per line) to JSON object format. This is an INPUT CONVERTER for AI workflows - use it FIRST when you receive tags in flat text format and need to work with them as a JSON object. Handles various text formats including key=value pairs (one per line), whitespace variations, empty lines, and comments (lines starting with #). Returns a clean JSON object with all parsed tags. Essential for processing OSM data from text exports, iD editor output, or JOSM exports.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | Yes | Tags in flat text format with key=value pairs, one per line (e.g., "amenity=restaurant\nname=Test Cafe\ncuisine=italian"). Empty lines and lines starting with # are ignored. Whitespace around keys and values is trimmed automatically. |