Title: Large integers do not work · Issue #157 · stleary/JSON-java · GitHub
Open Graph Title: Large integers do not work · Issue #157 · stleary/JSON-java
X Title: Large integers do not work · Issue #157 · stleary/JSON-java
Description: The following piece of code surprisingly outputs class java.lang.String, instead of a number-class like BigDecimal or BigInteger. import org.json.JSONException; import org.json.JSONObject; public class CodeTest { public static void main(...
Open Graph Description: The following piece of code surprisingly outputs class java.lang.String, instead of a number-class like BigDecimal or BigInteger. import org.json.JSONException; import org.json.JSONObject; public c...
X Description: The following piece of code surprisingly outputs class java.lang.String, instead of a number-class like BigDecimal or BigInteger. import org.json.JSONException; import org.json.JSONObject; public c...
Opengraph URL: https://github.com/stleary/JSON-java/issues/157
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Large integers do not work","articleBody":"The following piece of code surprisingly outputs `class java.lang.String`, instead of a number-class like BigDecimal or BigInteger.\n\n```\nimport org.json.JSONException;\nimport org.json.JSONObject;\n\n\npublic class CodeTest {\n\n public static void main(String[] args) throws JSONException {\n String str = \"{\\\"number_value\\\":9223372036854776000}\";\n JSONObject x = new JSONObject(str);\n System.out.println(x.get(\"number_value\").getClass());\n }\n}\n```\n\nSince JSON does not limit the size of numbers (to the best of my knowledge) I consider this to be a bug.\nThe culprit is JSONObject.stringToValue which will not work with numbers beyond the range of Java Long.\n","author":{"url":"https://github.com/effad","@type":"Person","name":"effad"},"datePublished":"2015-10-12T14:39:57Z","url":"https://github.com/stleary/JSON-java/issues/157"}
| 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:67729be6-f302-2f5d-df56-98dd9583a6c7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 880A:1C59B6:1B33BA:252EA0:6AFD5F31 |
| html-safe-nonce | 79299e390178cb6f6fcb8b20626666de4ab1c0d74a08375cffeb51ef7ede7786 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODBBOjFDNTlCNjoxQjMzQkE6MjUyRUEwOjZBRkQ1RjMxIiwidmlzaXRvcl9pZCI6IjY4NDQ0MzU2NzcyMzk5NDkyOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 433708bcc5ad909a370d08367e989065cb00d2f995dd7f1b85c863233caa37f9 |
| hovercard-subject-tag | issue:110987214 |
| 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/157/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b5f33629cb1efefae1f178a9f83994984735074b828a93afd5bf559974838b09/stleary/JSON-java/issues/157 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b5f33629cb1efefae1f178a9f83994984735074b828a93afd5bf559974838b09/stleary/JSON-java/issues/157 |
| og:image:alt | The following piece of code surprisingly outputs class java.lang.String, instead of a number-class like BigDecimal or BigInteger. import org.json.JSONException; import org.json.JSONObject; public c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | effad |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width