Implement json seiralization method for unordered_map

I implemented two types of json serialization methods for `unordered_map`.
nn.size() should be checked.