Title: Serialize IEnumerable as embeded issue · Issue #48 · JSONAPIdotNET/JSONAPI.NET · GitHub
Open Graph Title: Serialize IEnumerable as embeded issue · Issue #48 · JSONAPIdotNET/JSONAPI.NET
X Title: Serialize IEnumerable as embeded issue · Issue #48 · JSONAPIdotNET/JSONAPI.NET
Description: I have problem if class has property ICollection
Open Graph Description: I have problem if class has property ICollection
X Description: I have problem if class has property ICollection<SomeClass> foo and this property has attribute [SerializeAs(SerializeAsOptions.Embedded)]. There is switch with case SerializeAsOptions.Embedd...
Opengraph URL: https://github.com/JSONAPIdotNET/JSONAPI.NET/issues/48
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Serialize IEnumerable as embeded issue","articleBody":"I have problem if class has property `ICollection\u003cSomeClass\u003e foo` and this property has attribute `[SerializeAs(SerializeAsOptions.Embedded)]`. There is `switch` with `case SerializeAsOptions.Embedded` in `JsonApiFormatter.Serialize(..)`.\n\nThat case contains:\n`this.Serialize(prop.GetValue(value, null), writeStream, writer, serializer, aggregator);`\n\nBut property should be serialized as many.\n\nThere could be something like that:\n\n```\nvar propValue = prop.GetValue(value, null);\n\nif (_modelManager.IsSerializedAsMany(propValue.GetType()))\n this.SerializeMany(propValue, writeStream, writer, serializer, aggregator);\nelse\n this.Serialize(propValue, writeStream, writer, serializer, aggregator);\n```\n","author":{"url":"https://github.com/xotahal","@type":"Person","name":"xotahal"},"datePublished":"2015-02-04T07:30:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/48/JSONAPI.NET/issues/48"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4cc2a22f-2860-62ed-b5b8-e892b3e9a388 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95C2:1FFDFF:57D4299:7BFEC79:6A5007DC |
| html-safe-nonce | cd2c8c96848a3c190ed543a251857e79e55f34c549a60f84a3beadb04e6e6b4e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUMyOjFGRkRGRjo1N0Q0Mjk5OjdCRkVDNzk6NkE1MDA3REMiLCJ2aXNpdG9yX2lkIjoiMTQ4OTQzNzcxMzA2NTA1MjEyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 719edae09668a60d8a6e535f04aa15167e9b5fef783382f67ed6d9bc67aded4a |
| hovercard-subject-tag | issue:56490398 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JSONAPIdotNET/JSONAPI.NET/48/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8bfdbe5a2e310e3b7ed6a6e6e1aa27123944b3f667d1169dc36e8326ad9b83ce/JSONAPIdotNET/JSONAPI.NET/issues/48 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8bfdbe5a2e310e3b7ed6a6e6e1aa27123944b3f667d1169dc36e8326ad9b83ce/JSONAPIdotNET/JSONAPI.NET/issues/48 |
| og:image:alt | I have problem if class has property ICollection |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xotahal |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56eec25a3430492dd6ec2a480eb33256a0da5192d5714b0db4f5ab5f33203d94 |
| turbo-cache-control | no-preview |
| go-import | github.com/JSONAPIdotNET/JSONAPI.NET git https://github.com/JSONAPIdotNET/JSONAPI.NET.git |
| octolytics-dimension-user_id | 16112275 |
| octolytics-dimension-user_login | JSONAPIdotNET |
| octolytics-dimension-repository_id | 27474358 |
| octolytics-dimension-repository_nwo | JSONAPIdotNET/JSONAPI.NET |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27474358 |
| octolytics-dimension-repository_network_root_nwo | JSONAPIdotNET/JSONAPI.NET |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 93a615b89b7dcbdb6b678f4772931ecc28ada82a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width