package org.shedlang.compiler.config; import org.shedlang.compiler.config.json.Json5ObjectWithSource; import java.util.Optional; public record ProfileConfig(String name, Optional gc) { public static final ProfileConfig DEFAULT = new ProfileConfig("dev", Optional.empty()); public static ProfileConfig fromJson5(Json5ObjectWithSource object) { var name = object.getString("name").value(); var gc = object.getObject("gc").map(GcConfig::fromJson5); return new ProfileConfig(name, gc); } }