René's URL Explorer Experiment


Title: Can't deserialize response body from batch request as the json properties are single quoted · Issue #807 · microsoftgraph/msgraph-sdk-python-core · GitHub

Open Graph Title: Can't deserialize response body from batch request as the json properties are single quoted · Issue #807 · microsoftgraph/msgraph-sdk-python-core

X Title: Can't deserialize response body from batch request as the json properties are single quoted · Issue #807 · microsoftgraph/msgraph-sdk-python-core

Description: Describe the bug I'm trying to list applications filtered by particular IDs - there's loads of them so I'm using a batch request with 15 filters at a time (limit). This will allow me to get all the object IDs to query owners etc. When I ...

Open Graph Description: Describe the bug I'm trying to list applications filtered by particular IDs - there's loads of them so I'm using a batch request with 15 filters at a time (limit). This will allow me to get all the...

X Description: Describe the bug I'm trying to list applications filtered by particular IDs - there's loads of them so I'm using a batch request with 15 filters at a time (limit). This will allow me to...

Opengraph URL: https://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can't deserialize response body from batch request as the json properties are single quoted","articleBody":"### Describe the bug\n\nI'm trying to list applications filtered by particular IDs - there's loads of them so I'm using a batch request with 15 filters at a time (limit). This will allow me to get all the object IDs to query owners etc.\n\nWhen I attempt to deserialize the `BatchResponseContent` object with `get_response_by_id(response_id, ApplicationCollectionResponse)`, I get a stack telling me that it can't decode as the properties are single quoted rather than double quoted.\n\n```\nTraceback (most recent call last):\n  File \"/\u003cproject\u003e/.venv/lib/python3.9/site-packages/msgraph_core/requests/batch_response_content.py\", line 126, in response_body\n    parse_node = ParseNodeFactoryRegistry().get_root_parse_node(\n  File \"/\u003cproject\u003e/.venv/lib/python3.9/site-packages/kiota_abstractions/serialization/parse_node_factory_registry.py\", line 41, in get_root_parse_node\n    return factory.get_root_parse_node(vendor_specific_content_type, content)\n  File \"/\u003cproject\u003e/.venv/lib/python3.9/site-packages/kiota_abstractions/serialization/parse_node_proxy_factory.py\", line 56, in get_root_parse_node\n    node = self._concrete.get_root_parse_node(content_type, content)\n  File \"/\u003cproject\u003e/.venv/lib/python3.9/site-packages/kiota_serialization_json/json_parse_node_factory.py\", line 37, in get_root_parse_node\n    content_dict = json.loads(content_as_str)\n  File \"/usr/lib/python3.9/json/__init__.py\", line 346, in loads\n    return _default_decoder.decode(s)\n  File \"/usr/lib/python3.9/json/decoder.py\", line 337, in decode\n    obj, end = self.raw_decode(s, idx=_w(s, 0).end())\n  File \"/usr/lib/python3.9/json/decoder.py\", line 353, in raw_decode\n    obj, end = self.scan_once(s, idx)\njson.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)\n```\n\nThis is backed up by if I just try to do a `json_loads(response.body.decode('utf-8'))`, which then succeeds if I do a `.replace(\"'\", '\"')`.\n\n### Expected behavior\n\nI should be able to provide the ApplicationCollectionResponse object to BatchResponseContent.get_response_by_id and deserialize the batch response so that I can get the ID out of the response.\n\n### How to reproduce\n\n\n```\n    for app_filter in app_filters:\n        app_query_params = (\n            ApplicationsRequestBuilder.ApplicationsRequestBuilderGetQueryParameters(\n                select=[\"appId\", \"id\", \"serviceManagementReference\"],\n                filter=f\"appId in {app_filter}\",\n            )\n        )\n        app_request_config = RequestConfiguration(query_parameters=app_query_params)\n        \n        batch_request_content.add_request_information(\n            client.applications.to_get_request_information(\n                request_configuration=app_request_config\n            ),\n            app_filter,\n        )\n \n    batch_response = await client.batch.post(batch_request_content)\n\n    if not batch_response or not batch_response.responses:\n        log.error(\"Batch request for application object IDs failed\")\n        return None\n\n    for response_id in batch_response.responses.keys():\n        batch_response.get_response_by_id(response_id, ApplicationCollectionResponse) \n```\n\n\n### SDK Version\n\n1.17.0 of msgraph-sdk (so 1.2.0 of msgraph-core)\n\n### Latest version known to work for scenario above?\n\n_No response_\n\n### Known Workarounds\n\n_No response_\n\n### Debug output\n\n\u003cdetails\u003e\u003csummary\u003eClick to expand log\u003c/summary\u003e\n```\n\n\u003cLog output here\u003e\n\n```\n\u003c/details\u003e\n\n\n### Configuration\n\n_No response_\n\n### Other information\n\n_No response_","author":{"url":"https://github.com/drhar","@type":"Person","name":"drhar"},"datePublished":"2025-01-22T17:13:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/807/msgraph-sdk-python-core/issues/807"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8e0cf93a-a24e-827e-9880-9291aa6d20a9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC3DE:1851F5:32AD9D:4487AF:6969D37E
html-safe-nonce1538c09d7d41493e011c2a8a4c6123e7f35133eabfa6f1b4ef1c4b49e651f2cf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0RFOjE4NTFGNTozMkFEOUQ6NDQ4N0FGOjY5NjlEMzdFIiwidmlzaXRvcl9pZCI6IjczMzA0MDEyMjkwOTY5OTc3NTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac30bb3997de39c8a17f669c0069180c711f02614cc9a17289b41ab21d1bb63e78
hovercard-subject-tagissue:2804928885
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/microsoftgraph/msgraph-sdk-python-core/807/issue_layout
twitter:imagehttps://opengraph.githubassets.com/162316107f989380c4117f0fe876bce996bb83531f779fbca423730dee9ab05b/microsoftgraph/msgraph-sdk-python-core/issues/807
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/162316107f989380c4117f0fe876bce996bb83531f779fbca423730dee9ab05b/microsoftgraph/msgraph-sdk-python-core/issues/807
og:image:altDescribe the bug I'm trying to list applications filtered by particular IDs - there's loads of them so I'm using a batch request with 15 filters at a time (limit). This will allow me to get all the...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedrhar
hostnamegithub.com
expected-hostnamegithub.com
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
turbo-cache-controlno-preview
go-importgithub.com/microsoftgraph/msgraph-sdk-python-core git https://github.com/microsoftgraph/msgraph-sdk-python-core.git
octolytics-dimension-user_id17304259
octolytics-dimension-user_loginmicrosoftgraph
octolytics-dimension-repository_id242847794
octolytics-dimension-repository_nwomicrosoftgraph/msgraph-sdk-python-core
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id242847794
octolytics-dimension-repository_network_root_nwomicrosoftgraph/msgraph-sdk-python-core
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
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoftgraph%2Fmsgraph-sdk-python-core%2Fissues%2F807
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2Fmicrosoftgraph%2Fmsgraph-sdk-python-core%2Fissues%2F807
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=microsoftgraph%2Fmsgraph-sdk-python-core
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807
Reloadhttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807
microsoftgraph https://github.com/microsoftgraph
msgraph-sdk-python-corehttps://github.com/microsoftgraph/msgraph-sdk-python-core
Notifications https://github.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python-core
Fork 45 https://github.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python-core
Star 277 https://github.com/login?return_to=%2Fmicrosoftgraph%2Fmsgraph-sdk-python-core
Code https://github.com/microsoftgraph/msgraph-sdk-python-core
Issues 15 https://github.com/microsoftgraph/msgraph-sdk-python-core/issues
Pull requests 16 https://github.com/microsoftgraph/msgraph-sdk-python-core/pulls
Discussions https://github.com/microsoftgraph/msgraph-sdk-python-core/discussions
Actions https://github.com/microsoftgraph/msgraph-sdk-python-core/actions
Projects 0 https://github.com/microsoftgraph/msgraph-sdk-python-core/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/microsoftgraph/msgraph-sdk-python-core/security
Please reload this pagehttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807
Insights https://github.com/microsoftgraph/msgraph-sdk-python-core/pulse
Code https://github.com/microsoftgraph/msgraph-sdk-python-core
Issues https://github.com/microsoftgraph/msgraph-sdk-python-core/issues
Pull requests https://github.com/microsoftgraph/msgraph-sdk-python-core/pulls
Discussions https://github.com/microsoftgraph/msgraph-sdk-python-core/discussions
Actions https://github.com/microsoftgraph/msgraph-sdk-python-core/actions
Projects https://github.com/microsoftgraph/msgraph-sdk-python-core/projects
Security https://github.com/microsoftgraph/msgraph-sdk-python-core/security
Insights https://github.com/microsoftgraph/msgraph-sdk-python-core/pulse
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807
New issuehttps://github.com/login?return_to=https://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807
Can't deserialize response body from batch request as the json properties are single quotedhttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807#top
P1Priorityhttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues?q=state%3Aopen%20label%3A%22P1%22
priority:p1High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7dayshttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues?q=state%3Aopen%20label%3A%22priority%3Ap1%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
https://github.com/drhar
https://github.com/drhar
drharhttps://github.com/drhar
on Jan 22, 2025https://github.com/microsoftgraph/msgraph-sdk-python-core/issues/807#issue-2804928885
P1Priorityhttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues?q=state%3Aopen%20label%3A%22P1%22
priority:p1High priority/Major issue but not blocking or Big percentage of customers affected.Bug SLA <=7dayshttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues?q=state%3Aopen%20label%3A%22priority%3Ap1%22
type:bugA broken experiencehttps://github.com/microsoftgraph/msgraph-sdk-python-core/issues?q=state%3Aopen%20label%3A%22type%3Abug%22
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.