Skip to content

Commit

Permalink
Get JSON object from JsonUtil
Browse files Browse the repository at this point in the history
  • Loading branch information
bencomp committed Sep 15, 2023
1 parent 4e1bc5b commit 2ae1a9f
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import edu.harvard.iq.dataverse.workflow.step.WorkflowStepData;
import org.apache.commons.validator.routines.DomainValidator;

import java.io.StringReader;
import java.sql.Timestamp;
import java.text.ParseException;
import java.util.ArrayList;
Expand All @@ -53,7 +52,6 @@
import jakarta.json.Json;
import jakarta.json.JsonArray;
import jakarta.json.JsonObject;
import jakarta.json.JsonReader;
import jakarta.json.JsonString;
import jakarta.json.JsonValue;
import jakarta.json.JsonValue.ValueType;
Expand Down Expand Up @@ -682,8 +680,7 @@ private DatasetField remapGeographicCoverage(CompoundVocabularyException ex) thr
// convert DTO to datasetField so we can back valid values.
Gson gson = new Gson();
String jsonString = gson.toJson(geoCoverageDTO);
JsonReader jsonReader = Json.createReader(new StringReader(jsonString));
JsonObject obj = jsonReader.readObject();
JsonObject obj = JsonUtil.getJsonObject(jsonString);
DatasetField geoCoverageField = parseField(obj);

// add back valid values
Expand Down

0 comments on commit 2ae1a9f

Please sign in to comment.