json_decode fails
===

I'm fairly new to json, and I'm having an issue with json_decode.  I think I know why, but I haven't been able to sort out how to fix it.

Basically, I have a URL that supplies json info.  I grab it using cURL, and return it as a PHP variable, and that's working just fine.  I can print_r out all the info I want.  However, when I use json_decode($json, true), it returns NULL.

I THINK it's because, technically, what's being returned is not a string, but more like an object - and I can't sort out how to grab the contents of that object.

For example, when I return the json stuff as a php variable:

    print_r($json);


The output returned looks like so (I won't do it exactly, because it's HUGE, so I'll show you the layout to keep it simple)

    MyThing.returnedItems({
         "item1":[{"something:[],
                   "something else": "some value"},
                   "another fun thing": [{"more fun": "fun value 1",
                                          "even more!": "fun value 2"}]
                 ],
         "item2":{"another thing": "another value"}
    })

So you can see it's like a nested array.  I don't mind that, but I'd like to be able to access all the key/value pairs of these arrays as PHP variables.  But it seems because of the "MyThing.returnedItems()" surrounding it, it doesn't see it as a string to decode, so I get a NULL value every time.

Anyone know what I'm missing here? Once I figure out how to grab the stuff inside there, I think I've got it (simple foreach or whatnot to get the rest of the variables as needed), but I just can't seem to get in there.