Use ObjectMapper with stable serialization
@@ -24,7 +24,9 @@ import com.aws.greengrass.util.NucleusPaths;
import com.aws.greengrass.util.Pair;
import com.fasterxml.jackson.core.JsonPointer;
import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.vdurmont.semver4j.Requirement;
import com.vdurmont.semver4j.Semver;
@@ -104,7 +106,9 @@ public class KernelConfigResolver {
private final ComponentStore componentStore;
private final Kernel kernel;
- private static final ObjectMapper MAPPER = new ObjectMapper();
+ private static final ObjectMapper MAPPER = new ObjectMapper()
+ .enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)
+ .enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS);
/**
