JSONObject java

Java
import org.json.simple.JSONObject;

class JsonEncodeDemo {

   public static void main(String[] args) {
      JSONObject obj = new JSONObject();

	    inputJSON.put("subscriberName", "subscriber");
	    inputJSON.put("msisdn","7055389495");

      System.out.print(obj);
   }
}
Source

Also in Java: