encode

fun encode(): JsonObject

The frame as a JSON object: jsonrpc is always set, params and id only when present.