Skip to content

Commit

Permalink
Revert "Adding org.json.JSONObject example"
Browse files Browse the repository at this point in the history
This reverts commit 26a7eff.

Signed-off-by: Jorge Bescos Gascon <[email protected]>
  • Loading branch information
jbescos committed Jul 11, 2022
1 parent 26a7eff commit e1e9913
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
7 changes: 0 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2068,12 +2068,6 @@
<version>${gson.version}</version>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>${json.version}</version>
</dependency>

<dependency>
<groupId>io.opentracing</groupId>
<artifactId>opentracing-api</artifactId>
Expand Down Expand Up @@ -2218,6 +2212,5 @@
<servlet4.version>4.0.4</servlet4.version>
<yasson.version>1.0.11</yasson.version>
<gson.version>2.9.0</gson.version>
<json.version>20220320</json.version>
</properties>
</project>
6 changes: 0 additions & 6 deletions tests/e2e-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,6 @@
<artifactId>xmlunit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.glassfish.jersey.gson.JsonGsonFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.json.JSONObject;
import org.junit.Test;

public class GsonDefaultTest extends JerseyTest {
Expand All @@ -54,15 +53,6 @@ public Obj get() {
entity.setValue("get");
return entity;
}

@POST
@Consumes("application/json")
@Produces("application/json")
@Path("/jsonObject")
public JSONObject jsonObject(JSONObject entity) {
entity.put("bar", "bar");
return entity;
}
}

@Override
Expand Down Expand Up @@ -94,17 +84,6 @@ public void post() {
assertEquals("bar", obj.getValue());
}

@Test
public void jsonObject() {
JSONObject entity = new JSONObject();
entity.put("foo", "foo");
assertEquals("{\"foo\":\"foo\"}", entity.toString());
Response response = target("/test/jsonObject").request().post(Entity.json(entity));
assertEquals(200, response.getStatus());
entity = response.readEntity(JSONObject.class);
assertEquals("{\"foo\":\"foo\",\"bar\":\"bar\"}", entity.toString());
}

public static class Obj {
private String value;

Expand Down

0 comments on commit e1e9913

Please sign in to comment.