added serialization support to RestUtils class