Why does this take JSON, and not a decoded Python object?