Changes the 'open' and 'save' endpoints from GET -> POST requests. Loads/stores JSON according to:
{
react: {react-diagrams JSON},
networkx: {networkx graph as JSON},
}
Open route has options for Django receiving a file upload (file = request.FILES; json.load(file)) and for receiving raw JSON (json.loads(request.body)). We can probably settle on one; wasn't sure which was the best approach. The FileStorage is now not really used—the uploaded file is parsed in memory. We may want to revisit this and save before parsing.
Changes the 'open' and 'save' endpoints from GET -> POST requests. Loads/stores JSON according to:
Open route has options for Django receiving a file upload (
file = request.FILES; json.load(file)
) and for receiving raw JSON (json.loads(request.body)
). We can probably settle on one; wasn't sure which was the best approach. The FileStorage is now not really used—the uploaded file is parsed in memory. We may want to revisit this and save before parsing.