converted 'links' to JSON