Javascript, Ajax & JSON: weird "xml processing" error when parsing response

I make an ajax call with jquery $.get() which returns a json array and it works fine on some cases. On other cases however, in Firefox i get a weird error saying (translated from german):

XML-processing error: syntax error

This is the structure of the json as shown in my servlet int the java console:

[{"key":"...","type":"...","content":"..."},
 {"key":"...","type":"...","content":"..."},
 ...]

And this is the structure when logged in ff console using JSON.stringify():

[{/"key":/"...",/"type":/"...",/"content":/"..."},
     {/"key":/"...",/"type":/"...",/"content":/"..."},
     ...]

My request simply looks like this:

$.get(url, 
        {"operation": "search", "searchText": searchText, "types": types, "resultNumber": 99},
        function(data, status){
            console.log(JSON.stringify(data));
    });

My java method for creating the JSON array:

private JSONArray parseJSON (ArrayList<ResultObject> aResultList) throws JSONException
    {
        JSONArray resultJSONArray = new JSONArray();

        for (ResultObject resultObject : aResultList)
        {
            JSONObject jsonObject = new JSONObject();
            HashMap<String,String> fields = resultObject.getFields();

            for (Map.Entry<String, String> entry : fields.entrySet())
            {
                jsonObject.put(entry.getKey(), entry.getValue());
            }
            resultJSONArray.put(jsonObject);
        }
        return resultJSONArray;
    }

Whats going on here? Where are all these backslashes in the returned json coming from?

Looks like that you’r response is not processed by jQuery as you expected.
try to add a

dataType:"json"

as option for you’r request, also take care that you’r server-side set’s the right header on HTTP response (Content-Type: application/json)

because as I can see from you’r post, looks like that you pass a string to JSON.stringify

I hope that i help you, have a nice day