code: public static JSONArray toJsonArray(byte[] bytes) {
          String json;
          try {
              json = new String(bytes, Const.UTF8);
              return new JSONArray(json);
          } catch (UnsupportedEncodingException e) {
              throw new WebbException(e);
          } catch (JSONException e) {
              throw new WebbException("payload is not a valid JSON array", e);
          }
      }
docs: Convert a byte array to a JSONArray.
  @param bytes a UTF-8 encoded string representing a JSON array.
  @return the parsed JSON array
  @throws WebbException in case of error (usually a parsing error due to invalid JSON)