curl_json plugin: Refactor the way trees/keys are stored.