Json in cytoscape js is not a real json? I can not process this data correctly. Especially, when I use json.parse, json.encode or jquery.getJSON()
json='[{ data: {id:"oxid"},group:"nodes"}]
it should be like this, otherwise, jQuery.parseJSON(), parseJSON() or jquery.getJSON() can not parse it correctly.
json='[{ "data": {id:"oxid"},"group":"nodes"}]
I want to get the json data automatically by using jquery.getJSON() based on different data I got from users, but it failed. Anyone who has any idea?
PS. I can create json automatically by printing out the data as I want in the <script> area, but I don't like this method, because I can not reload my data
automatically by using cy.load(). I hope there is one way that I can just pass an argument to cy.load() to reload my graph. something like this cy.load(json_data), here
json_data is a string variable.