All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openlca.io.openepd.Ec3OrgInfo Maven / Gradle / Ivy

There is a newer version: 2.2.1
Show newest version
package org.openlca.io.openepd;

import java.util.Optional;

import com.google.gson.JsonElement;
import org.openlca.jsonld.Json;

public class Ec3OrgInfo {

	public String id;
	public String name;

	public static Optional fromJson(JsonElement elem) {
		if (elem == null || !elem.isJsonObject())
			return Optional.empty();
		var obj = elem.getAsJsonObject();
		var info = new Ec3OrgInfo();
		info.id = Json.getString(obj, "id");
		info.name = Json.getString(obj, "name");
		return Optional.of(info);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy