serialization/deserialization for UserResource