[VIVO-1320] Convert some org.json usages to Jackson
This commit is contained in:
parent
f594f455dd
commit
7d52bd097f
1 changed files with 2 additions and 3 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
package org.vivoweb.webapp.startup;
|
package org.vivoweb.webapp.startup;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
import org.apache.jena.query.QuerySolution;
|
import org.apache.jena.query.QuerySolution;
|
||||||
import org.apache.jena.query.ResultSet;
|
import org.apache.jena.query.ResultSet;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
||||||
|
@ -14,8 +15,6 @@ import edu.cornell.mannlib.vitro.webapp.dao.jena.QueryUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.json.JSONException;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import javax.servlet.ServletContextEvent;
|
import javax.servlet.ServletContextEvent;
|
||||||
import javax.servlet.ServletContextListener;
|
import javax.servlet.ServletContextListener;
|
||||||
|
@ -29,7 +28,7 @@ public class JSONWrapperSetup implements ServletContextListener {
|
||||||
public void contextInitialized(ServletContextEvent servletContextEvent) {
|
public void contextInitialized(ServletContextEvent servletContextEvent) {
|
||||||
IndividualJsonWrapper.setAddJSONFields(new IndividualJsonWrapper.AddJSONFields() {
|
IndividualJsonWrapper.setAddJSONFields(new IndividualJsonWrapper.AddJSONFields() {
|
||||||
@Override
|
@Override
|
||||||
public void add(JSONObject jo, VitroRequest vreq, Individual ind) throws JSONException {
|
public void add(ObjectNode jo, VitroRequest vreq, Individual ind) {
|
||||||
jo.put("preferredTitle", findPreferredTitle(vreq, ind));
|
jo.put("preferredTitle", findPreferredTitle(vreq, ind));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue