Changed format of JSON Serialization to better handle graph elements as keys in maps.