bytesToJSON utilizes the JSONArtifact interface which is an interface the JSONArray & JSONObject utilize. That means you could get back an array or an object from the code. If you want something that will work no matter what the JSON data looks like then the bytesToJSON is the thing to choose. How you interact with the data is different if you have a JSONArray or a JSONObject. If you know what you should have and want to be explicit on what you want back, you can utilize:bytesToJSONArray & bytesToJSONObjectThese utilize the same bytesToJSON and then verifies whether they are type expected (JSONArray or JSONObject) and will throw an error if the data isn't in Array or Object format respectively.
In this scenario of utilizing an Enterprise Service, I don't think it really matters either way. erData I believe will always be a single record (not an array). At that point you'd always get a JSONObject back so it wouldn't impact your script processing.