このプラグインでは、すべてが正常に機能します。ここでは、jsonはこの形式です。私はjsonを初めて使用するため、コードを理解できません。
[
{id: 7, name: "Ruby"},
{id: 11, name: "Python"},
{id: 13, name: "JavaScript"},
{id: 17, name: "ActionScript"},
{id: 19, name: "Scheme"},
{id: 23, name: "Lisp"},
{id: 29, name: "C#"},
{id: 31, name: "Fortran"},
{id: 37, name: "Visual Basic"},
{id: 41, name: "C"},
{id: 43, name: "C++"},
{id: 47, name: "Java"}
]
しかし、私のjsonはこのようなものです。
{
"data": [
{id: 7, name: "Ruby"},
{id: 11, name: "Python"},
{id: 13, name: "JavaScript"},
{id: 17, name: "ActionScript"},
{id: 19, name: "Scheme"},
{id: 23, name: "Lisp"},
{id: 29, name: "C#"},
{id: 31, name: "Fortran"},
{id: 37, name: "Visual Basic"},
{id: 41, name: "C"},
{id: 43, name: "C++"},
{id: 47, name: "Java"}
],
"paging": {
"next": "https://graph.facebook.com/100000454970389/friends?access_token=AAAAAAITEghMBAPkZAGQhUiXWSeaewhYZBsZBXIs37swq4Th90HHIwYfKgm12M9u20UR9iqpeTtXv477ZAvx5nD0NsbSMJWlpTCNSrvxZCTVHg6upTAZBmV&limit=5000&offset=5000&__after_id=100004141210773"
}
}
これは、jsonを解析しているjavascriptです。
https://github.com/loopj/jquery-tokeninput/blob/master/src/jquery.tokeninput.js
前もって感謝します。