You convert instances of JSONObject to ObjectNode above.  Don't you want to do the same thing here?