Title: Invalid XML2JSON conversion of bitmask with a leading 1 · Issue #1025 · stleary/JSON-java · GitHub
Open Graph Title: Invalid XML2JSON conversion of bitmask with a leading 1 · Issue #1025 · stleary/JSON-java
X Title: Invalid XML2JSON conversion of bitmask with a leading 1 · Issue #1025 · stleary/JSON-java
Description: We are using the following XML to JSON conversion in our code bases. private JSONObject xmlToJson() throws Exception { JSONObject jsonObj = null; FileReader fr = new FileReader(benchmarkXmlFile); // Reads the XML file (data.xml) jsonObj ...
Open Graph Description: We are using the following XML to JSON conversion in our code bases. private JSONObject xmlToJson() throws Exception { JSONObject jsonObj = null; FileReader fr = new FileReader(benchmarkXmlFile); /...
X Description: We are using the following XML to JSON conversion in our code bases. private JSONObject xmlToJson() throws Exception { JSONObject jsonObj = null; FileReader fr = new FileReader(benchmarkXmlFile); /...
Opengraph URL: https://github.com/stleary/JSON-java/issues/1025
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invalid XML2JSON conversion of bitmask with a leading 1","articleBody":"We are using the following XML to JSON conversion in our code bases.\n\n```\nprivate JSONObject xmlToJson() throws Exception {\n JSONObject jsonObj = null;\n FileReader fr = new FileReader(benchmarkXmlFile); // Reads the XML file (data.xml)\n jsonObj = XML.toJSONObject(fr); // Performs the conversion using org.json.XML\n fr.close();\n return jsonObj;\n }\n```\n\nThe XML file contains a bitmask\n```\n\u003cProcessAffinity\u003e\n \u003cRanks\u003e\n \u003cRank\u003e0\u003c/Rank\u003e\n \u003cMask\u003e1000000000000000000000000000000000000000000000000000\u003c/Mask\u003e\n \u003c/Ranks\u003e\n\u003c/ProcessAffinity\u003e\n```\n\nThis bit mask is converted to a floating point number in JSON, only if it has a leading \"1\" otherwise the conversion is valid:\n\n\u003cimg width=\"1177\" height=\"258\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/806ddea3-b9fe-40b0-85b0-e0623b93262b\" /\u003e","author":{"url":"https://github.com/mhmarkushuber","@type":"Person","name":"mhmarkushuber"},"datePublished":"2025-12-08T08:27:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1025/JSON-java/issues/1025"}
| 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:8b8015c0-9d98-6a0b-35ae-a2ee506d7c01 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0E4:3301CD:84C4C44:B07E74A:696E0950 |
| html-safe-nonce | dbb85a0f46cd2122efe9b1cd8e8c7edf764521c3a5b0a4d356f5725479db36ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEU0OjMzMDFDRDo4NEM0QzQ0OkIwN0U3NEE6Njk2RTA5NTAiLCJ2aXNpdG9yX2lkIjoiNTQ1NjY3MzUwMzg4NDEwNzA0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6771e165c9ed12dee68e0837ac07cfc8fd1ee666f4c77fde39c3710d62cb0f87 |
| hovercard-subject-tag | issue:3705227438 |
| 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/stleary/JSON-java/1025/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4dc447c6cbd6761cbf726152d6b279ae018d190bd9aeef98ff50ed88947a47e/stleary/JSON-java/issues/1025 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4dc447c6cbd6761cbf726152d6b279ae018d190bd9aeef98ff50ed88947a47e/stleary/JSON-java/issues/1025 |
| og:image:alt | We are using the following XML to JSON conversion in our code bases. private JSONObject xmlToJson() throws Exception { JSONObject jsonObj = null; FileReader fr = new FileReader(benchmarkXmlFile); /... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mhmarkushuber |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0b1760aa20e1a810eba6245d04e3885be7363dfe08d08b61f605c852359472e0 |
| turbo-cache-control | no-preview |
| go-import | github.com/stleary/JSON-java git https://github.com/stleary/JSON-java.git |
| octolytics-dimension-user_id | 5107558 |
| octolytics-dimension-user_login | stleary |
| octolytics-dimension-repository_id | 1187853 |
| octolytics-dimension-repository_nwo | stleary/JSON-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1187853 |
| octolytics-dimension-repository_network_root_nwo | stleary/JSON-java |
| 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 | 84090305cd10c2b140bf307f69f57f0892b4f215 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width