use 'snippet' and 'title' from api
use json in document's constructor