I cannot get a value from a key, because the key has a $
in it. Here is the jsonobject:
JSONParser parser = new JSONParser();
String str = "{\"$oid\":\"5168d0e0b280f084c3742800\"}";
JSONObject obj = (JSONObject)parser.parse(str);
String oid = (String) obj.get("$oid");
System.out.println("oid: " + oid);
However the output is:
oid: null
How can I deal with the key with a special character $
in it?