Skip to content

a JSON version would be niceย #4

@divinity76

Description

@divinity76

for example

$ php -r '$r=file_get_contents("https://raw.githubusercontent.com/sphrak/svenska-stader/master/src/svenska-stader.csv");$l=explode("\n",trim($r));$k=str_getcsv($l[0]);unset($l[0]);foreach($l as $l){$v=str_getcsv($l);$v[3]=(float)$v[3];$v[4]=(float)$v[4];$d[]=array_combine($k,$v);}echo json_encode($d,JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES|JSON_THROW_ON_ERROR);' | pastebinit

currently prints https://pastebin.com/PFaDpH5V

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions