I'm developing android application and I'm using jsp for mysql connection. What is the other way to use json_encode in JSP? Because it's dedicated in PHP.
            Asked
            
        
        
            Active
            
        
            Viewed 270 times
        
    1 Answers
0
            
            
        Try this for like json_encoded in php it will work fine
 <%@page contentType="text/html; charset=UTF-8"%>
    <%@page import="org.json.simple.JSONObject"%>
    <%
        JSONObject json = new JSONObject();
        json.put("name", "john");
        json.put("mobile", "999999999");
        out.print(json);
        out.flush();
    %>
 
    
    
        Vinod Kumawat
        
- 741
- 5
- 8
