Hacker News new | ask | show | jobs
by inputespresso 2375 days ago
Stripe's API is well documented, but I don't understand why it uses form data instead of JSON. Seems weird/scary to have an API driven by completely unstructured text.
2 comments

It is structured. The first page of the Stripe API links to the encoding standards. The main difference between it and JSON is JSON supports complex data structures while form encoding is flat key-values. In fact, with RFC7578, multipart/form-data encoding allows arbitrary Unicode strings, unlike JSON, which requires weird handling of some Unicode data.
What's unstructured about HTML form data format?