If the size of namespace/key is 0, why to call append_escape ? append_escape for loop itself will come out immediately.