Title: JSONObject#getString() returns a string literal - "null" instead of null when the value is null · Issue #5 · stleary/JSON-java · GitHub
Open Graph Title: JSONObject#getString() returns a string literal - "null" instead of null when the value is null · Issue #5 · stleary/JSON-java
X Title: JSONObject#getString() returns a string literal - "null" instead of null when the value is null · Issue #5 · stleary/JSON-java
Description: This test case fails: public void testNull() throws Exception { JSONObject j; j = new JSONObject("{\"message\":\"null\"}"); assertFalse(j.isNull("message")); assertEquals("null", j.getString("message")); j = new JSONObject("{\"message\":...
Open Graph Description: This test case fails: public void testNull() throws Exception { JSONObject j; j = new JSONObject("{\"message\":\"null\"}"); assertFalse(j.isNull("message")); assertEquals("null", j.getString("messa...
X Description: This test case fails: public void testNull() throws Exception { JSONObject j; j = new JSONObject("{\"message\":\"null\"}"); assertFalse(j.isNull("message"));...
Opengraph URL: https://github.com/stleary/JSON-java/issues/5
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JSONObject#getString() returns a string literal - \"null\" instead of null when the value is null","articleBody":"## This test case fails:\n\n```\npublic void testNull() throws Exception {\n JSONObject j;\n\n j = new JSONObject(\"{\\\"message\\\":\\\"null\\\"}\");\n assertFalse(j.isNull(\"message\"));\n assertEquals(\"null\", j.getString(\"message\"));\n\n j = new JSONObject(\"{\\\"message\\\":null}\");\n assertTrue(j.isNull(\"message\"));\n assertEquals(null, j.getString(\"message\")); // fail here: getString should return null instead of \"null\"\n}\n```\n\n---\n","author":{"url":"https://github.com/yusuke","@type":"Person","name":"yusuke"},"datePublished":"2010-12-28T08:07:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/5/JSON-java/issues/5"}
| 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:3f633135-ccf9-c754-8d15-2a03685b36d2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FAC:2BBB15:6FA9E5:953ECF:6A5B79F8 |
| html-safe-nonce | d3c11bd92bde5b18c4cba739331952b17383c5c4ecadeffb949a521f24e9ee9c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkFDOjJCQkIxNTo2RkE5RTU6OTUzRUNGOjZBNUI3OUY4IiwidmlzaXRvcl9pZCI6IjIxODc0OTIwNjkwMTA1MzY5NTMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3ac29597fcdf76bf2783e9f6b05440bd4e4cbf367c38817922f2a6f7c07ba531 |
| hovercard-subject-tag | issue:494780 |
| 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/5/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bc016f5731b1690e74d423893579fe39d214288a8986d639468ef197ff9acb4c/stleary/JSON-java/issues/5 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bc016f5731b1690e74d423893579fe39d214288a8986d639468ef197ff9acb4c/stleary/JSON-java/issues/5 |
| og:image:alt | This test case fails: public void testNull() throws Exception { JSONObject j; j = new JSONObject("{\"message\":\"null\"}"); assertFalse(j.isNull("message")); assertEquals("null", j.getString("messa... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | yusuke |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| 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 | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width