René's URL Explorer Experiment


Title: Support conditional link serialization format · Issue #27 · JSONAPIdotNET/JSONAPI.NET · GitHub

Open Graph Title: Support conditional link serialization format · Issue #27 · JSONAPIdotNET/JSONAPI.NET

X Title: Support conditional link serialization format · Issue #27 · JSONAPIdotNET/JSONAPI.NET

Description: This would be a really killer feature for my project. I have some ember routes that fetch a decently complex graph of data, and there's really no good way to inform the server that this particular route needs to side-load deeply, while m...

Open Graph Description: This would be a really killer feature for my project. I have some ember routes that fetch a decently complex graph of data, and there's really no good way to inform the server that this particular ...

X Description: This would be a really killer feature for my project. I have some ember routes that fetch a decently complex graph of data, and there's really no good way to inform the server that this particu...

Opengraph URL: https://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support conditional link serialization format","articleBody":"This would be a really killer feature for my project. I have some ember routes that fetch a decently complex graph of data, and there's really no good way to inform the server that this particular route needs to side-load deeply, while maintaining the ability to return sparse results at other times (say, when loading a list).\n\nFor a simple example. I have a resource called `Organization`, which has many `Notes`. Notes have a `User` that entered the note. When I load an organization detail record, I want to load all the notes for that organization, as well the user that entered each note, preferably all in a single AJAX request. However if I am on a route where I need to fetch a list of Organizations, I only want to serialize an href to fetch the related records. As far as I can tell, this kind of conditional link formatting isn't yet possible. [The spec](http://jsonapi.org/format/#fetching-includes) has a solution for this, by allowing the client to specify resource paths to include.\n\nI'm happy to put in the legwork toward implementing this feature, but I want to make sure I get the architecture right. The first step is to add a parameter to the Get methods on ApiController\u003cT\u003e to gain access to the `include` query param. After that I'm not sure, I guess we have to change the IMaterializer interface somehow to allow the ApiController to tell the provider what to include. Then here comes the hard part: How do we tell the formatter to override its own strategy for resource linking behavior, and instead use what the client sent? Remember, MediaTypeFormatter does not have access to the request context.\n\nTwo potential solutions occur to me:\n1. Make the formatter not be in charge of deciding what relationships to serialize at all. We add another action filter that runs after our other filters (filter, sort, enumerate). This filter would consult the IModelManager, and then modify the object content to return an ExpandoObject, and all the formatter has to do is serialize that to JSON.\n2. Still add another action filter, but instead of using the model manager, have it wrap the content in some sort of object that contains hints for the formatter to tell it what relationships to serialize. The formatter would be changed to handle this new object if it sees it, and fall back to the existing behavior if it is passed something else.\n#2 is less of a drastic change and I think I prefer it, just wanted to get your thoughts. Am I missing something obvious?\n","author":{"url":"https://github.com/csantero","@type":"Person","name":"csantero"},"datePublished":"2015-01-26T22:39:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/27/JSONAPI.NET/issues/27"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c5aa0d81-566c-c6bc-147b-72901dc3a6e6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD0D8:13EE66:101E14F:16DC651:6A50B1AA
html-safe-nonce457e112e217ae29566133e1d871bb23c52722f9cc4dce2fac09e13846ed8dc98
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEQ4OjEzRUU2NjoxMDFFMTRGOjE2REM2NTE6NkE1MEIxQUEiLCJ2aXNpdG9yX2lkIjoiNjMxOTYwMzQwOTI2MDQyNTY0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac771eb3ed7edd8397a268f821828b4151bb28e5952b38430d6e8e6d1c79cc2b6e
hovercard-subject-tagissue:55548273
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONAPIdotNET/JSONAPI.NET/27/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9b4c64dfd6e9dc202a3d15ea60fe7f6c6c22d4324879eed2df73da6fade2aa95/JSONAPIdotNET/JSONAPI.NET/issues/27
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9b4c64dfd6e9dc202a3d15ea60fe7f6c6c22d4324879eed2df73da6fade2aa95/JSONAPIdotNET/JSONAPI.NET/issues/27
og:image:altThis would be a really killer feature for my project. I have some ember routes that fetch a decently complex graph of data, and there's really no good way to inform the server that this particular ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecsantero
hostnamegithub.com
expected-hostnamegithub.com
Noned6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb
turbo-cache-controlno-preview
go-importgithub.com/JSONAPIdotNET/JSONAPI.NET git https://github.com/JSONAPIdotNET/JSONAPI.NET.git
octolytics-dimension-user_id16112275
octolytics-dimension-user_loginJSONAPIdotNET
octolytics-dimension-repository_id27474358
octolytics-dimension-repository_nwoJSONAPIdotNET/JSONAPI.NET
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27474358
octolytics-dimension-repository_network_root_nwoJSONAPIdotNET/JSONAPI.NET
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPIdotNET%2FJSONAPI.NET%2Fissues%2F27
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSONAPIdotNET%2FJSONAPI.NET%2Fissues%2F27
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JSONAPIdotNET%2FJSONAPI.NET
Reloadhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27
Reloadhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27
Reloadhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27
Please reload this pagehttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27
JSONAPIdotNET https://github.com/JSONAPIdotNET
JSONAPI.NEThttps://github.com/JSONAPIdotNET/JSONAPI.NET
Notifications https://github.com/login?return_to=%2FJSONAPIdotNET%2FJSONAPI.NET
Fork 23 https://github.com/login?return_to=%2FJSONAPIdotNET%2FJSONAPI.NET
Star 101 https://github.com/login?return_to=%2FJSONAPIdotNET%2FJSONAPI.NET
Code https://github.com/JSONAPIdotNET/JSONAPI.NET
Issues 28 https://github.com/JSONAPIdotNET/JSONAPI.NET/issues
Pull requests 5 https://github.com/JSONAPIdotNET/JSONAPI.NET/pulls
Actions https://github.com/JSONAPIdotNET/JSONAPI.NET/actions
Projects https://github.com/JSONAPIdotNET/JSONAPI.NET/projects
Wiki https://github.com/JSONAPIdotNET/JSONAPI.NET/wiki
Security and quality 0 https://github.com/JSONAPIdotNET/JSONAPI.NET/security
Insights https://github.com/JSONAPIdotNET/JSONAPI.NET/pulse
Code https://github.com/JSONAPIdotNET/JSONAPI.NET
Issues https://github.com/JSONAPIdotNET/JSONAPI.NET/issues
Pull requests https://github.com/JSONAPIdotNET/JSONAPI.NET/pulls
Actions https://github.com/JSONAPIdotNET/JSONAPI.NET/actions
Projects https://github.com/JSONAPIdotNET/JSONAPI.NET/projects
Wiki https://github.com/JSONAPIdotNET/JSONAPI.NET/wiki
Security and quality https://github.com/JSONAPIdotNET/JSONAPI.NET/security
Insights https://github.com/JSONAPIdotNET/JSONAPI.NET/pulse
Support conditional link serialization formathttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27#top
enhancementhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues?q=state%3Aopen%20label%3A%22enhancement%22
1.0.0https://github.com/JSONAPIdotNET/JSONAPI.NET/milestone/2
https://github.com/csantero
csanterohttps://github.com/csantero
on Jan 26, 2015https://github.com/JSONAPIdotNET/JSONAPI.NET/issues/27#issue-55548273
The spechttp://jsonapi.org/format/#fetching-includes
add gitignore file #2https://github.com/JSONAPIdotNET/JSONAPI.NET/pull/2
enhancementhttps://github.com/JSONAPIdotNET/JSONAPI.NET/issues?q=state%3Aopen%20label%3A%22enhancement%22
1.0.0No due datehttps://github.com/JSONAPIdotNET/JSONAPI.NET/milestone/2
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.