Proper JSON serialization of attachment <link>s