如何用php解析这个json? [关闭]

I got a json file like this:

[{
    city: "myCity",
    lat: 11.1111,
    format: "etc",
    lng: 1.11,
    street: "mystreet",
    hours: [{
        A: "0230",
        B: "2200",
        C: "16-04-2012"
    }, {
        A: "0130",
        B: "2200",
        C: "11-04-2012"
    }, {
        A: "0230",
        B: "2200",
        C: "18-04-2012"
    }, {
        A: "0130",
        B: "2200",
        C: "12-04-2012"
    }, {
        A: "0230",
        B: "2200",
        C: "20-04-2012"
    }, {
        A: "0130",
        B: "2200",
        C: "13-04-2012"
    }, {
        A: "0230",
        B: "2200",
        C: "22-04-2012"
    }, {
        A: "0130",
        B: "2200",
        C: "14-04-2012"
    }, {
        A: "0230",
        B: "2200",
        C: "24-04-2012"
    }, {
        A: "0130",
        B: "2200",
        C: "15-04-2012"
    }, {
        A: "0230",
        B: "2200",
        C: "26-04-2012"
    }, {
        A: "0130",
        B: "2200",
        C: "16-04-2012"
    }, {
        A: "0230",
        B: "2200",
        C: "28-04-2012"
    }, {
        A: "0130",
        B: "2200",
        C: "17-04-2012"
    }],
    housenumber: "12"
}]

Firebug parses this without a problem. It says "hours" is an object that has certain objects in it that contains a F, U and D. But I cannot get parse it with the regular php parsers. I was almost changing it to XML, but that would cost me a lot of time and there must be some parser that can handle this format if firebug can handle it!

I'm certain this is a duplicate, but can't find it. And because comments go ignored, I'll just add it as answer again.

If you need to decode a Javascript expression (it doesn't have key quotes as JSON would require it) you can use:

As inadvisable alternative there are some regex and string patching workarounds for pre-processing unquoted keys.

$obj = json_decode($json);

http://php.net/json-decode