I've asked for that too a month ago:
https://github.com/spesmilo/electrum/issues/284I guess as long as Electrum is in active development (no 1.x release) we won't see any doc since, at least in theory, everything could change.
But you can uncomment
on Line 99 and
on line 395 to print the JSON request while running the Electrum client.
What language / technologie do you use for your client?
That was more or less my tactic as well. The fun part is that it uses the same JSON exchange protocol as stratum miners. That basically means a JSON block followed by a return is a message and either side can send messages at any time. Requests have IDs and responses to the request should have the same ID.