Deserialize the next available object as an instance of class_name

Return the deserialized object on success and record in errors if class_name is unknown.

This method should be redefined for each custom subclass of Serializable. All refinement should look for a precise class_name and call super on unsupported classes.

Property definitions

serialization $ Deserializer :: deserialize_class
	# Deserialize the next available object as an instance of `class_name`
	#
	# Return the deserialized object on success and
	# record in `errors` if `class_name` is unknown.
	#
	# This method should be redefined for each custom subclass of `Serializable`.
	# All refinement should look for a precise `class_name` and call super
	# on unsupported classes.
	protected fun deserialize_class(class_name: Text): nullable Object do
		if class_name == "Error" then return new Error.from_deserializer(self)
		return deserialize_class_intern(class_name)
	end
lib/serialization/serialization_core.nit:136,2--147,4

github $ GithubDeserializer :: deserialize_class
	redef fun deserialize_class(name) do
		if name == "Issue" then
			var issue = super.as(Issue)
			if path.last.has_key("pull_request") then
				issue.is_pull_request = true
			end
			return issue
		else if name == "Commit" then
			var commit = super.as(Commit)
			var git_commit = commit.commit
			if git_commit != null then commit.message = git_commit.message
			return commit
		end
		return super
	end
lib/github/api.nit:1131,2--1145,4