monarch-initiative / monarch-app

Monarch Initiative website and API
https://monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
16 stars 4 forks source link

Remove unnecessarily escaped slashes in jsonl graph artifact #676

Open kevinschaper opened 4 months ago

kevinschaper commented 4 months ago

Both the id and iri have slashes preceded by a backslash in this jsonl output:

{"id":"OBO:ro\/subsets#ro-eco","category":["biolink:NamedThing","biolink:Entity"],"name":"eco subset","xref":null,"provided_by":["phenio_nodes"],"synonym":null,"full_name":null,"in_taxon":null,"in_taxon_label":null,"symbol":null,"description":null,"deprecated":null,"iri":"http:\/\/purl.obolibrary.org\/obo\/ro\/subsets#ro-eco","same_as":null}
kevinschaper commented 4 months ago

I checked in on this, I learned that it's apparently it's valid in json to escape forward slashes, but not necessary, and that exists to be able to put json into script tags. It's something that Pandas does when exporting json, and they don't have an option to turn that off.

I think pandas is probably the wrong choice for this conversion.