Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
buildscript {
ext {
jmockitVersion = "1.49"
springBootVersion = "3.3.5"
springBootVersion = "3.4.3"
}
}

Expand All @@ -13,6 +13,6 @@ plugins {
description = 'Java Library for Accessing Cloud Foundry Environment Variables'

wrapper {
gradleVersion = "8.7"
gradleVersion = "8.13"
}

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion java-cfenv-all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
}
dependencies {
// groupId changed from com.github.johnrengelman to com.gradleup.shadow
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.5'
classpath 'com.gradleup.shadow:shadow-gradle-plugin:8.3.6'
}
}

Expand Down
2 changes: 1 addition & 1 deletion java-cfenv/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
description = 'Java CF Env Core Library'

dependencies {
api 'com.cedarsoftware:json-io:4.30.0'
api 'com.cedarsoftware:json-io:4.51.0'

testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "junit:junit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
package io.pivotal.cfenv.core;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.cedarsoftware.io.JsonIo;
import com.cedarsoftware.io.JsonObject;
import com.cedarsoftware.io.ReadOptionsBuilder;


public class JsonIoConverter {
Expand All @@ -35,9 +35,13 @@ public class JsonIoConverter {
* @return a serialized version of the input in a Map
*/
public static Map jsonToJavaWithListsAndInts(String jsonInput) {
Map args = new HashMap();
args.put(JsonIo.USE_MAPS, true);
JsonObject rawServicesMap = JsonIo.toObjects(jsonInput, JsonIo.getReadOptionsBuilder(args).build(), JsonObject.class);
// Create read options that will return JsonObjects (Maps) instead of fully resolved Java objects
ReadOptionsBuilder readOptionsBuilder = new ReadOptionsBuilder()
.returnAsJsonObjects();

// Parse the JSON string into a JsonObject (Map)
JsonObject rawServicesMap = JsonIo.toJava(jsonInput, readOptionsBuilder.build()).asClass(JsonObject.class);

return convertArraysAndLongs(rawServicesMap);
}

Expand Down Expand Up @@ -85,5 +89,4 @@ private static List convertArray(Object[] array) {
}
return resultList;
}

}