passing a valid JSON to the viewer

todo: still need more info about the file path.. in php callback, return the user specific path?