tidied up the Converter
This commit is contained in:
parent
db094db709
commit
9d2fd6d51c
|
@ -129,15 +129,6 @@ public class Converter {
|
||||||
return repository;
|
return repository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<RepositorySnippet> jsonToRepositorySnippetList(JSONObject json) throws JSONException {
|
|
||||||
|
|
||||||
List<RepositorySnippet> resultSet = new ArrayList<>();
|
|
||||||
JSONArray rs = json.getJSONArray("datasourceInfo");
|
|
||||||
for (int i = 0; i < rs.length(); i++)
|
|
||||||
resultSet.add(toRepositorySnippet(rs.getJSONObject(i)));
|
|
||||||
return resultSet;
|
|
||||||
}
|
|
||||||
|
|
||||||
public RepositorySnippet toRepositorySnippet(JSONObject repositorySnippetObject) throws JSONException {
|
public RepositorySnippet toRepositorySnippet(JSONObject repositorySnippetObject) throws JSONException {
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,7 +222,7 @@ public class Converter {
|
||||||
return repositoryInterface;
|
return repositoryInterface;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toJson(Repository repository) throws JSONException, JsonProcessingException {
|
public String toJson(Repository repository) throws JsonProcessingException {
|
||||||
|
|
||||||
HashMap<String, Object> repositoryMap = new HashMap<>();
|
HashMap<String, Object> repositoryMap = new HashMap<>();
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
Loading…
Reference in New Issue