namespace to dict