Improve JSON serialization of related links.