{"id":4882,"date":"2020-04-09T22:09:33","date_gmt":"2020-04-09T14:09:33","guid":{"rendered":"https:\/\/ixyzero.com\/blog\/?p=4882"},"modified":"2020-04-09T22:09:33","modified_gmt":"2020-04-09T14:09:33","slug":"java%e4%b8%ad%e4%b8%80%e4%ba%9b-npe-%e6%8a%a5%e9%94%99%e5%92%8c%e5%ae%9a%e4%bd%8d%e5%8a%9e%e6%b3%95%e6%95%b4%e7%90%86","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/4882.html","title":{"rendered":"Java\u4e2d\u4e00\u4e9b NPE \u62a5\u9519\u548c\u5b9a\u4f4d\u529e\u6cd5\u6574\u7406"},"content":{"rendered":"\n<p>=Start=<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u7f18\u7531\uff1a<\/h4>\n\n\n\n<p>\u5df2\u7ecf\u6709\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4\u90fd\u6ca1\u6709\u5199Java\u4ee3\u7801\u4e86\uff0c\u6700\u8fd1\u56e0\u4e3a\u5de5\u4f5c\u9700\u8981\u53c8\u8981\u518d\u7528Java\u5b9e\u73b0\u4e00\u4e9b\u529f\u80fd\uff0c\u56e0\u4e3aJava\u57fa\u7840\u7684\u4e0d\u591f\u624e\u5b9e\u4ee5\u53ca\u751f\u4ea7\u73af\u5883\u7684\u590d\u6742\u591a\u53d8\u5bfc\u81f4\u672c\u5730\u8fd0\u884c\u6d4b\u8bd5OK\u7684\u4ee3\u7801\u5230\u4e86\u7ebf\u4e0a\u4e4b\u540e\u5c31\u4f1a\u9047\u5230\u4e00\u4e9b\u975e\u9884\u671f\u7684\u62a5\u9519\uff0c\u6700\u5e38\u89c1\u7684\u5c31\u662fNullPointerException\u7a7a\u6307\u9488\u5f02\u5e38\u4e86\u3002\u56e0\u6b64\u8fd9\u91cc\u53ca\u65f6\u6574\u7406\u603b\u7ed3\u4e00\u4e0b\u8fd1\u671f\u9047\u5230\u7684NPE\u5f02\u5e38\u53ca\u5176\u89e3\u51b3\u529e\u6cd5\uff0c\u65b9\u4fbf\u540e\u9762\u6709\u9700\u8981\u7684\u65f6\u5019\u53c2\u8003\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b63\u6587\uff1a<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u89e3\u7b54\uff1a<\/h5>\n\n\n\n<p>Java\u4e2d\u7684NPE\u95ee\u9898\u5bf9\u4e8e\u6211\u8fd9\u79cdJava\u65b0\u624b\u6765\u8bf4\u771f\u7684\u662f\u592a\u5e38\u89c1\u4e86\u2026\u2026\u5f88\u70e6\uff0c\u4e0d\u8fc7\u6709\u4e00\u70b9\u597d\u5c31\u5728\u4e8e\u62a5\u9519\u7684\u884c\u5b9a\u4f4d\u975e\u5e38\u7cbe\u51c6\uff0c\u95ee\u9898\u80af\u5b9a\u5c31\u51fa\u5728\u90a3\u4e2a\u5730\u65b9\u4e86\uff0c\u53ea\u662f\u6839\u56e0\u4e0d\u4e00\u5b9a\u5728\u90a3\uff08\u6709\u53ef\u80fd\u662f\u4e4b\u524d\u67d0\u4e2a\u5730\u65b9\u5904\u7406\u4e0d\u59a5\u5584\u6700\u540e\u6d41\u8f6c\u5230\u8fd9\u91cc\u6765\u4e86\uff09\uff0c\u8fd9\u65f6\u9700\u8981\u4e00\u5c42\u4e00\u5c42\u7684\u5f80\u4e0a\u5b9a\u4f4d\u4e86\u3002<\/p>\n\n\n\n<p>\u6574\u7406\u603b\u7ed3\u4e00\u4e0b\u6700\u8fd1\u7ecf\u5e38\u9047\u5230\u7684\u51e0\u4e2a NPE \u7684\u70b9\uff1a<\/p>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\">1\u3001<strong>json\u4e2d\u7ed9\u4e00\u4e2akey\u7684value\u8d4b\u503c\u4e3anull\u6216\u7a7a\u4e32\u5176\u6548\u679c\u662f\u4e0d\u4e00\u6837\u7684<\/strong>\uff1b<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>\u5728 fastjson \u4e2d\u5f53\u4e00\u4e2akey\u7684value\u5185\u5bb9\u662fnull\u65f6\uff0c\u6700\u540e\u5176\u5b9e\u662f\u6ca1\u6709\u8fd9\u4e2a key \u7684\uff0c\u8fd9\u70b9\u9700\u8981\u6ce8\u610f\u4e00\u4e0b<\/strong>\uff0c\u7279\u522b\u662f\u5728\u540e\u671f\u6709\u5904\u7406\u8fd9\u4e2ajson\u5bf9\u8c61\u7684\u64cd\u4f5c\u65f6\uff1b<\/li><li>\u5728 fastjson \u4e2d\u5f53\u4e00\u4e2akey\u7684value\u5185\u5bb9\u662f&#8221;&#8221;\u65f6(\u7a7a\u5b57\u7b26\u4e32)\uff0c\u540e\u7eed\u5904\u7406\u7684\u65f6\u5019\u4f1a\u5b58\u5728\u8fd9\u4e2a key \uff0c\u4e14\u5185\u5bb9\u4e3a&#8221;&#8221;\uff0c\u7b26\u5408\u9884\u671f\u3002<\/li><\/ul>\n\n\n\n<p><strong>2\u3001\u4ecejson\u4e2d(\u94fe\u5f0f)\u53d6\u4e0d\u5b58\u5728\u7684 key \uff1b<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\">\u9996\u5148\uff0c\u8981\u5904\u7406\u7684\u5b57\u7b26\u4e32\u5fc5\u987b\u7b26\u5408json\u7684\u683c\u5f0f\u8981\u6c42\uff0c\u5426\u5219\u4f1a\u62a5 JSONException \u5f02\u5e38\uff0c\u8fd9\u4e2a\u6bd4\u8f83\u7b80\u5355\uff0c\u4f46\u4e5f\u9700\u8981\u786e\u8ba4\u4e00\u4e0b\uff1b<br>\u5176\u6b21\uff0c\u5982\u679c\u4e00\u5c42\u4e00\u5c42\u5904\u7406\u7684\u8bdd\uff0c\u5982\u679c\u54ea\u4e00\u5c42\u6ca1\u6709\u5bf9\u5e94\u7684 key \u5219\u5728\u90a3\u4e00\u5c42\u8fd4\u56de\u7684\u5c31\u662f null \uff0c\u6240\u4ee5\u4e0b\u5c42\u5982\u679c\u7ee7\u7eed\u5904\u7406\u7684\u8bdd\u5c31\u4f1a\u62a5 NullPointerException \u5f02\u5e38\uff1b<br><strong>\u6700\u540e\uff0c\u5982\u679c\u5e0c\u671b\u80fd\u6b63\u786e\u89e3\u6790json\u5b57\u7b26\u4e32\uff0c\u9700\u8981\u5bf9json\u5b57\u7b26\u4e32\u7684\u683c\u5f0f\u6709\u5145\u5206\u4e86\u89e3\uff08\u6709\u54ea\u4e9b\u5b57\u6bb5\uff0c\u5b57\u6bb5\u5bf9\u5e94\u7684\u662f\u4ec0\u4e48\u7c7b\u578b\uff09\uff0c\u7b26\u5408\u9884\u671f\u5c31\u6b63\u786e\u5904\u7406\uff0c\u4e0d\u7b26\u5408\u9884\u671f\u629b\u51fa\u5f02\u5e38\u6216\u662f\u62a5\u9519\u5373\u53ef\u3002<\/strong><\/p>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u6d4b\u8bd5\u7528\u7684\u4ee3\u7801\u7247\u6bb5\uff0c\u65b9\u4fbf\u8fdb\u884c\u672c\u5730\u9a8c\u8bc1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import com.alibaba.fastjson.JSON;\nimport com.alibaba.fastjson.JSONObject;\n\nimport java.io.IOException;\nimport java.util.HashSet;\nimport java.util.Properties;\nimport java.util.Set;\n\npublic class DoTest {\n    public static void main(String&#91;] args) {\n        String input = \"{\\\"msg\\\":\\\"success\\\",\\\"code\\\":\\\"200\\\",\\\"data\\\":\\\"{\\\\\\\"score\\\\\\\":3,\\\\\\\"key1\\\\\\\":3,\\\\\\\"key2\\\\\\\":2,\\\\\\\"tags\\\\\\\":\\\\\\\"a,b,c\\\\\\\"}\\\"}\";\n        input = \"{\\\"msg\\\":\\\"success\\\",\\\"code\\\":\\\"200\\\",\\\"data\\\":\\\"{\\\\\\\"score\\\\\\\":0}\\\"}\"; \/\/ 0 null\n        input = \"{\\\"msg\\\":\\\"success\\\",\\\"code\\\":\\\"200\\\",\\\"data\\\":\\\"{\\\\\\\"key1\\\\\\\":0}\\\"}\"; \/\/ null null\n        input = \"{\\\"msg\\\":\\\"success\\\",\\\"code\\\":\\\"200\\\",\\\"data\\\":\\\"{}\\\"}\"; \/\/ null null\n        \/\/ input = \"{\\\"msg\\\":\\\"success\\\",\\\"code\\\":\\\"200\\\",\\\"data\\\":\\\"\\\"}\"; \/\/ NullPointerException\n        \/\/ input = \"{\\\"msg\\\":\\\"success\\\",\\\"code\\\":\\\"200\\\",\\\"data\\\":\\\"\\\"\"; \/\/ JSONException: syntax error, position at 0, name data\n        \/\/ input = \"{\\\"msg\\\":\\\"success\\\",\\\"code\\\":\\\"200\\\"}\"; \/\/ NullPointerException\n        JSONObject inputJson = JSON.parseObject(input);\n        System.out.println(inputJson);\n        Integer score = inputJson.getJSONObject(\"data\").getInteger(\"score\");\n        String tagStr = inputJson.getJSONObject(\"data\").getString(\"tags\");\n        System.out.println(score + \"\\t\" + tagStr);\n\n        Set&lt;String> tags = new HashSet&lt;>();\n        \/\/ tags.add(\"111\");\n        \/\/ tags.add(\"112\");\n        System.out.println(tags.toString());\n\n        JSONObject result = new JSONObject();\n        result.put(\"1001\", 5);\n        System.out.println(result);\n        System.out.println(result.getInteger(\"1001\"));\n\n        Integer int1001 = result.getInteger(\"1001\");\n        int sum = 0;\n        if (sum > 0 || (int1001 != null &amp;&amp; int1001 > 0)) {\n            sum += int1001;\n            result.put(\"score\", sum>100?100:sum);\n        }\n        System.out.println(result);\n\n        \/\/ result.remove(\"1001\");\n        System.out.println(result);\n\n        Integer ret = 0;\n        ret += result.getInteger(\"1001\");\n        System.out.println(ret);\n\n        Properties prop = new Properties();\n        try {\n            \/\/load a properties file from class path, inside static method\n            prop.load(DoTest.class.getClassLoader().getResourceAsStream(\"config.properties\"));\n\n            \/\/get the property value and print it out\n            System.out.println(prop.getProperty(\"json\").length());\n        }\n        catch (IOException ex) {\n            ex.printStackTrace();\n        }\n\n    }\n}<\/code><\/pre>\n\n\n\n<p><strong>3\u3001\u5728\u4e0d\u540c\u7c7b\u578b\u7684\u53d8\u91cf\u4e4b\u95f4\u8fdb\u884c\u64cd\u4f5c\uff1b<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-vivid-red-color\">\u4ee5 int \u548c Integer \u4e3a\u4f8b\uff1a<br><strong>int \u662f\u57fa\u672c\u7c7b\u578b\uff0c\u4e0d\u662f\u7c7b<\/strong>\uff0c\u4e3a\u4e86\u7b26\u5408\u9762\u5411\u5bf9\u8c61\u7f16\u7a0b\uff0c\u540e\u6765\u51fa\u73b0\u4e86Integer\u7c7b\uff0c\u5b83\u662f\u5bf9int\u8fdb\u884c\u5c01\u88c5\u7684\u3002<br><strong>int \u4e0d\u662f\u5bf9\u8c61\uff0c\u662fjava\u539f\u59cb\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5b83\u9ed8\u8ba4\u503c\u4e3a0<\/strong>\u3002<br><strong>Integer \u662f\u5bf9\u8c61\uff0c\u5b83\u662f\u5bf9int\u8fdb\u884c\u7684\u5c01\u88c5\uff0c\u5b83\u9ed8\u8ba4\u503c\u4e3aNULL<\/strong>\u3002<br>\u5efa\u8bae\u5728\u7528 Integer \u65f6\uff0c\u6ce8\u610f\u68c0\u67e5\u5176\u503c\u662f\u5426\u4e3a null \uff0c\u907f\u514d NPE \u62a5\u9519\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Integer sum = new Integer(0);<\/code><\/pre>\n\n\n\n<p><strong>4\u3001json\u53d6\u503c\u4e2d getInteger \u548c getIntValue \u4e24\u8005\u4e4b\u95f4\u7684\u533a\u522b\u548c\u8bd5\u7528\u573a\u666f\uff1b<\/strong><\/p>\n\n\n\n<p><strong>\u4e00\u822c\u60c5\u51b5\u4e0b\uff08\u53ea\u9700\u8981\u53d6key\u5bf9\u5e94\u6574\u6570\u7684\u6570\u503c\u5927\u5c0f\u65f6\uff09\uff0c\u6211\u4e2a\u4eba\u8fd8\u662f\u5efa\u8bae\u7528 getIntValue \u56e0\u4e3a\u5b83\u8fd4\u56de\u7684\u662f int \uff0c\u6ca1\u53d6\u5230\u8fd4\u56de 0 \uff1b<\/strong>\u5982\u679c\u5bf9\u4e8e\u5185\u5bb9\u53ef\u80fd\u4e3a 0 \u7684\u90a3\u4e9b\u573a\u666f\uff0c\u53ef\u4ee5\u7528 getInteger \u518d\u52a0\u4e0a null \u7684\u5224\u65ad\uff1b<strong>\u6216\u8005\u7edf\u4e00\u90fd\u7528getInteger+null\u5224\u65ad\u3002<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>JSONObject jsonObject = new JSONObject();\nString data = null; \/\/ {}\njsonObject.put(\"data\", data);\n\nSystem.out.println(jsonObject.getInteger(\"key1\")); \/\/ null\nSystem.out.println(jsonObject.getIntValue(\"key1\")); \/\/ 0\nSystem.out.println(jsonObject); \/\/ {}\n\ndata = \"\"; \/\/ {\"data\":\"\"}\njsonObject.put(\"data\", data);\nSystem.out.println(jsonObject); \/\/ {\"data\":\"\"}\n\njsonObject.put(\"key1\", 1);\nSystem.out.println(jsonObject.getInteger(\"key1\")); \/\/ 1\nSystem.out.println(jsonObject.getIntValue(\"key1\")); \/\/ 1\nSystem.out.println(jsonObject); \/\/ {\"key1\":1,\"data\":\"\"}<\/code><\/pre>\n\n\n\n<p><strong>5\u3001Apache POI\u4e2d\u7684 setCellValue \u64cd\u4f5c\uff1b<\/strong><\/p>\n\n\n\n<p>\u7528Apache POI\u64cd\u4f5c\u65f6\uff0ccreateCell \u521b\u5efa\u6700\u591a\u62a5 IllegalArgumentException \u5f02\u5e38\uff0c\u4e0d\u4f1a\u6709 NPE \u5f02\u5e38\uff0c\u90a3\u4e2a\u53ea\u4f1a\u51fa\u73b0\u5728 setCellValue \u8bbe\u7f6e\u5355\u5143\u683c\u5185\u5bb9\u65f6\u51fa\u73b0\uff0c\u539f\u56e0\u5c31\u662f\u8bbe\u7f6e\u7684\u503c\u7c7b\u578b\u4e3a null \uff0c\u800c\u4e14\u7b80\u5355\u6d4b\u53ef\u80fd\u8fd8\u4e0d\u5bb9\u6613\u53d1\u73b0\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import com.alibaba.fastjson.JSONObject;\nimport org.apache.poi.ss.usermodel.Cell;\nimport org.apache.poi.ss.usermodel.Row;\nimport org.apache.poi.xssf.usermodel.XSSFSheet;\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\n\nimport java.io.FileOutputStream;\nimport java.io.IOException;\n\npublic class WriteExcel {\n    public static void main(String&#91;] args) {\n        XSSFWorkbook workbook = new XSSFWorkbook();\n        XSSFSheet sheet = workbook.createSheet(\"ixyzero\");\n\n        int rowCount = 0;\n        Row row = sheet.createRow(++rowCount);\n\n        JSONObject jsonObject = new JSONObject();\n\n        int columnCount = 0;\n        Cell cell = row.createCell(columnCount++);\n        System.out.println(jsonObject.getIntValue(\"key1\")); \/\/ 0\n        cell.setCellValue(jsonObject.getIntValue(\"key1\")); \/\/ \u6b63\u5e38\uff0c\u56e0\u4e3a\u5373\u4fbf\u53d6\u4e0d\u5230key1\u7684value\u4f1a\u9ed8\u8ba4\u8fd4\u56de0\n\n        String data = null;\n        cell = row.createCell(columnCount++);\n        cell.setCellValue(data); \/\/ \u5b83\u8bf4\u4ed6\u5bf9null\u505a\u4e86\u5bb9\u9519\u5904\u7406\uff0c\u4e0d\u4f1a\u62a5 NPE \u5f02\u5e38\n\n        cell = row.createCell(columnCount++);\n        System.out.println(jsonObject.getInteger(\"key1\")); \/\/ null\n        cell.setCellValue(jsonObject.getInteger(\"key1\")); \/\/ NullPointerException\n\n        try (FileOutputStream outputStream = new FileOutputStream(\"ixyzero.xlsx\")) {\n            workbook.write(outputStream);\n        } catch (IOException e) {\n            e.printStackTrace();\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u53c2\u8003\u94fe\u63a5\uff1a<\/h5>\n\n\n\n<p>java\u4e2d\u56e0\u4e3a int \u548c Integer \u4e0d\u540c\u5bfc\u81f4\u7684 NPE \u95ee\u9898<br><a href=\"https:\/\/stackoverflow.com\/questions\/218384\/what-is-a-nullpointerexception-and-how-do-i-fix-it\">https:\/\/stackoverflow.com\/questions\/218384\/what-is-a-nullpointerexception-and-how-do-i-fix-it<\/a><br><a href=\"https:\/\/blog.csdn.net\/weixin_41575100\/article\/details\/78953079\">https:\/\/blog.csdn.net\/weixin_41575100\/article\/details\/78953079<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/17487205\/how-to-check-if-a-json-key-exists\">https:\/\/stackoverflow.com\/questions\/17487205\/how-to-check-if-a-json-key-exists<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/14283684\/null-check-for-hashmap-key\">https:\/\/stackoverflow.com\/questions\/14283684\/null-check-for-hashmap-key<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/poi.apache.org\/apidocs\/dev\/org\/apache\/poi\/ss\/usermodel\/Row.html#createCell-int-\">http:\/\/poi.apache.org\/apidocs\/dev\/org\/apache\/poi\/ss\/usermodel\/Row.html#createCell-int-<\/a><\/p>\n\n\n\n<p><a href=\"http:\/\/apache-poi.1045710.n5.nabble.com\/Bug-59199-New-setting-null-value-to-date-cell-leads-to-NPE-td5722365.html\">http:\/\/apache-poi.1045710.n5.nabble.com\/Bug-59199-New-setting-null-value-to-date-cell-leads-to-NPE-td5722365.html<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.experts-exchange.com\/questions\/23180270\/How-to-avoid-NullPointerException-in-excel-writing.html\">https:\/\/www.experts-exchange.com\/questions\/23180270\/How-to-avoid-NullPointerException-in-excel-writing.html<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/stackoverflow.com\/questions\/20694915\/apachi-poi-cell-setcellvalue-thows-nullpointerexception\">https:\/\/stackoverflow.com\/questions\/20694915\/apachi-poi-cell-setcellvalue-thows-nullpointerexception<\/a><\/p>\n\n\n\n<p>=END=<\/p>\n","protected":false},"excerpt":{"rendered":"<p>=Start= \u7f18\u7531\uff1a \u5df2\u7ecf\u6709\u5f88\u957f\u4e00\u6bb5\u65f6\u95f4\u90fd\u6ca1\u6709\u5199Java\u4ee3\u7801\u4e86\uff0c\u6700\u8fd1\u56e0\u4e3a\u5de5\u4f5c\u9700\u8981\u53c8\u8981\u518d\u7528Java\u5b9e\u73b0\u4e00\u4e9b\u529f\u80fd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,7],"tags":[61,1607,1606,19],"class_list":["post-4882","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-programing","tag-java","tag-npe","tag-nullpointerexception","tag-tips"],"views":2999,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=4882"}],"version-history":[{"count":1,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4882\/revisions"}],"predecessor-version":[{"id":4883,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/4882\/revisions\/4883"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=4882"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=4882"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=4882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}