JSON-RPC: two API fixes

This fixes two errors in the JSON-RPC API definition reported by @freezy (thanks).