ai.vespa.schemals.lsp.common.command.CommandUtils Maven / Gradle / Ivy
package ai.vespa.schemals.lsp.common.command;
import java.util.Optional;
import com.google.gson.JsonPrimitive;
public class CommandUtils {
public static Optional getStringArgument(Object jsonObject) {
if (!(jsonObject instanceof JsonPrimitive))
return Optional.empty();
JsonPrimitive arg = (JsonPrimitive) jsonObject;
return Optional.of(arg.getAsString());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy