Strict datatypes for Stratum and JSON-RPC messages