This is what I thought a very simple issue. Basically I am trying to send a json string to a REST API service. Here is the JSON they supply
"vslText": "[field1] = '12345678'"
Now to send it to the REST as a string I've tried
String jsonRequest = "{ 'vslText' : '[field1] = " + ""
But I get lost in all the quotes.
I tried using
JSONObject jsonRequest = new JSONObject();
jsonRequest.put("vslText", "[field1] = '12345678'");
but I get this error
An error occurred at line: 18 in the jsp file: /jsp/javaServlet/IDsearch.jsp
JSONObject cannot be resolved to a type
Here is my import clause
<%@ page import="java.util.*" %>
<%@ page import= "java.io.*" %>
<%@ page import= "java.net.*" %>
<%@ page import= "org.json.JSONObject" %>
Please give me direction?