Fixed issue with JSON serialization for attributes
Added special case for when main ids can be strings
Bug fix for deserializing JSON attributes