hash map encode

I added the support to encode string maps like hxjson2 does. I hope it will be integrated into the main branch.