3 ms·
I have worked with a supplier / service who advertised us their brand new shiny REST/JSON based API that we could use to replace the drop a csv in a sftp workfl
by breakfastduck 3y ago
I have worked with a supplier / service who advertised us their brand new shiny REST/JSON based API that we could use to replace the drop a csv in a sftp workflow they offered previously.
The API was a post with a single JSON field called data, with a CSV string value. You just know they were asked by management to deliver an API and decided to do quite literally the minimum viable.
They had 'no plans' to expand it.
- cgio 3y agoHow anyone would see that as a MVP when you can make a pretty solid API with Postgrest eludes me.
- crgwbr 3y agoIt’s MVP because it (1) is an API and (2) is doing nothing more than writing it’s output to the same sftp server the client used to hit directly. Not debating it’s dumb, but almost by definition enterprise tech ossifies in weird, dumb ways.
- hyperman1 3y agoI've seen similar in the wild with XML, except the charset was wrong and escaping was incomplete. So you get the XML header with UTF8 encoding, a root tag, an indented child tag. 3 lines. Then ye olde CSV, with the 5 required entities for ascii escaped, but if you manage to put accented chars in it, they end up in ISO 8859-1. Then 2 lines footer. If you wrote out the file, the header and footer had to be byte for byte identical. Entities encoding non ascii just crashed the parser. Of course, the CSV lines were sensitive to indentation, they just dropped the first 8 chars of each line. Still, XML was officially supported.