samedi 9 mai 2015

Is this json wrong?

I've created the following json:

{ "posts" : [
    {"post" : 
        {"person" : somePerson,
        "messages" : [person says : Hello how are you,person2 says : I'm fine]
        }
    },
    {"post" : 
        {"person" : someOtherPerson,
        "messages" : [person says : I'm happy,person2 says : me too]
        }
    }
  ] 
}

But jquery .done is not being called with this input. I suspect there is something wrong with the format of the json. I don't know if I'm allowed to pass an aaray "messages" inside a json object. If I'm not, how can I resolve this? Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire