You are doing JSON APIs wrong. When you use JSON to call an API – not a REST API, but something like JSON-RPC – you will usually want to encode one of several possible messages. Your request body looks like this: { “type”: “MessageWithA”, “data”: { “a”: 5 } } Or like this: { “type”:…
