I'm working with a tool that uses JSON data. Now I'm trying to feed it my own JSON data that I build as a string then try to convert to a JSON object.
Here's the tool. Do a View-Source on the page to see how they're feeding it data:
I need to provide it data dynamically. I can't embed the data on the page as they're doing. I will need to return the timeline data from an ajax call to the server and somehow feed it to the timeline.
Of course, in their example, they're not returning a string from the server and trying to cast it into a JSON object. It's already neatly ready to work perfectly, as a hard-coded JSON structure.
I've tried building a string that looks like *their* JSON data, then casting it to be a JSON list. To that end, I've tried the jQuery string-to-JSON-object method, and I've tried just JSON.parse(str). Everything returns NULL, so starting with a JSON-like string and "casting" it to a JSON data structure isn't working for me.
How can I feed dynamic JSON timeline data to this tool?