Document TO_JSON method