I load the tree : "js-tree tree-plugins="wholerow,dnd" tree-ajax="api/v1/apps/files_tree"></js-tree"
My backend emit this json:
[{"text": "Child Node 1", "a_attr": {"b-prop": false, "a-prop": false}, "children": true, "state": {"disabled": false, "selected": true, "opened": false}, "id": 2, "li_attr": {"x-prop": false, "y-prop": false}}, {"text": "Child Node 2", "state": {"disabled": false, "selected": false, "opened": false}, "children": true, "id": 3, "icon": "/jstree/imgs/tree.png"}]
And i get this error from jquery 2.1.3:
Error: Syntax error, unrecognized expression: [{"text": "Root Node 1", "a_attr": {"b-prop": true, "a-prop": true}, "children": true, "state": {"disabled": false, "selected": true, "opened": false}, "id": "tree_id_1", "li_attr": {"x-prop": true, "y-prop": true}, "icon": "/jstree/imgs/tree.png"}, {"text": "Root Node 2", "a_attr": {"b-prop": false, "a-prop": false}, "children": true, "state": {"disabled": false, "selected": false, "opened": false}, "id": "tree_id_2", "li_attr": {"x-prop": false, "y-prop": false}}]
throw new Error( "Syntax error, unrecognized expression: " + msg );
With tree-json everything is ok but not with tree-ajax ...
I use jstree 3.0.9