serialization and deserialization json and xml