Title: phone numbers that start with one 0 get treated as int · Issue #49 · stleary/JSON-java · GitHub
Open Graph Title: phone numbers that start with one 0 get treated as int · Issue #49 · stleary/JSON-java
X Title: phone numbers that start with one 0 get treated as int · Issue #49 · stleary/JSON-java
Description: Hello, Here in brazil we have phone numbers that start with 0800 and they get treated as ints thereby losing the first 0. Tracked down the error to this bit of code in XML.java try { char initial = string.charAt(0); boolean negative = fa...
Open Graph Description: Hello, Here in brazil we have phone numbers that start with 0800 and they get treated as ints thereby losing the first 0. Tracked down the error to this bit of code in XML.java try { char initial =...
X Description: Hello, Here in brazil we have phone numbers that start with 0800 and they get treated as ints thereby losing the first 0. Tracked down the error to this bit of code in XML.java try { char initial =...
Opengraph URL: https://github.com/stleary/JSON-java/issues/49
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"phone numbers that start with one 0 get treated as int","articleBody":"Hello,\n\nHere in brazil we have phone numbers that start with 0800 and they get treated as ints thereby losing the first 0.\n\nTracked down the error to this bit of code in XML.java\n\n```\n try {\n char initial = string.charAt(0);\n boolean negative = false;\n if (initial == '-') {\n initial = string.charAt(1);\n negative = true;\n }\n if (initial == '0' && string.charAt(negative ? 2 : 1) == '0') {\n return string;\n }\n if ((initial >= '0' && initial \u003c= '9')) {\n if (string.indexOf('.') >= 0) {\n return Double.valueOf(string);\n } else if (string.indexOf('e') \u003c 0 && string.indexOf('E') \u003c 0) {\n Long myLong = new Long(string);\n if (myLong.longValue() == myLong.intValue()) {\n return new Integer(myLong.intValue());\n } else {\n return myLong;\n }\n }\n }\n } catch (Exception ignore) {\n }\n```\n\nIt seems to want to convert any value 0XNNNN... (where X isn't 0 and N is any digit) as an int. \nAny particular reason for this?\n","author":{"url":"https://github.com/pcasaes","@type":"Person","name":"pcasaes"},"datePublished":"2012-03-23T20:41:31Z","url":"https://github.com/stleary/JSON-java/issues/49"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:2d10ea34-22d0-2741-7141-9018feb2227c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FEC:2A53E5:43482:5C9FE:6AFD3C5A |
| html-safe-nonce | 135cdc9bf57b2de841fe1cecd1548c30e4aaf52027da6d98883a2b4178573af9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkVDOjJBNTNFNTo0MzQ4Mjo1QzlGRTo2QUZEM0M1QSIsInZpc2l0b3JfaWQiOiI2NzY4NTU3NTk0ODUzMDYzNzcwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 12dfff0b97de165d1cec85146229e30cb81ab4c04c0aef10b99b8579d10627cc |
| hovercard-subject-tag | issue:3786970 |
| 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/49/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9aa45b18c87e27cb9494975877c80387f8eb4382ce7cf313a120a56a3fe257f5/stleary/JSON-java/issues/49 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9aa45b18c87e27cb9494975877c80387f8eb4382ce7cf313a120a56a3fe257f5/stleary/JSON-java/issues/49 |
| og:image:alt | Hello, Here in brazil we have phone numbers that start with 0800 and they get treated as ints thereby losing the first 0. Tracked down the error to this bit of code in XML.java try { char initial =... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pcasaes |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| 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 | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width