Hey,
I am using json.net to parse objects and delivering them to a webservice I have made. The objects are LINQ-objects. When I access this webservice with JQuery, it doesn't parse the JSON correctly. There seems to be something wrong with the formatting..
The JSON-string I get is this one:
[{"typeid":1,
"typename":"binders",
"description":"test",
"RESOURCEs":
[{"resourceid":4,
"resourcename":"Binders 1",
"description":"Pakke med hele fire binders!!!",
"typeid":1,
"RESERVATIONLINEs":[]
},
{"resourceid":10,
"resourcename":"xxx",
"description":"xxx",
"typeid":1,
"RESERVATIONLINEs":[]
}
]
},
{"typeid":2,
"typename":"blyant",
"description":"også dyrt",
"RESOURCEs":
[{"resourceid":5,
"resourcename":"Gråblyant 1",
"description":"Fin og grå",
"typeid":2,
"RESERVATIONLINEs":[]
},
{"resourceid":6,
"resourcename":"Rødblyant 1",
"description":"Må spisses ofte",
"typeid":2,
"RESERVATIONLINEs":[]
}
]
},
{"typeid":4,
"typename":"Penn",
"description":"tester",
"RESOURCEs":
[{"resourceid":7,
"resourcename":"Penn 1",
"description":"Blå og fin",
"typeid":4,
"RESERVATIONLINEs":[]
},
{"resourceid":11,
"resourcename":"xxx",
"description":"xxx",
"typeid":4,
"RESERVATIONLINEs":[]
}
]
},
{"typeid":5,
"typename":"Kajakk",
"description":"Dette er en type båt",
"RESOURCEs":
[{"resourceid":1,
"resourcename":"Havkajakk 1",
"description":"FOr havbruk",
"typeid":5,
"RESERVATIONLINEs":[]
},
{"resourceid":2,
"resourcename":"Havkajakk 2",
"description":"For havbruk",
"typeid":5,
"RESERVATIONLINEs":[]
}
]
},
{"typeid":6,
"typename":"3G-modem",
"description":"Fra NetCom",
"RESOURCEs":
[{"resourceid":3,
"resourcename":"3G-modem 1",
"description":"Gammelt og ustabilg",
"typeid":6,
"RESERVATIONLINEs":[]
},
{"resourceid":12,
"resourcename":"xxx",
"description":"xxx",
"typeid":6,
"RESERVATIONLINEs":[]
}
]
},
{"typeid":7,
"typename":"Minnepinne",
"description":"på 1 KB",
"RESOURCEs":
[{"resourceid":8,
"resourcename":"Minnepinne 1",
"description":"1 KB (!)",
"typeid":7,
"RESERVATIONLINEs":[]
},
{"resourceid":9,
"resourcename":"Minnepinne 2",
"description":"20 PB",
"typeid":7,
"RESERVATIONLINEs":[]
}
]
}]
Anyone have a clue why this is not working?