{"id":936,"date":"2023-11-18T12:17:44","date_gmt":"2023-06-18T06:23:04","guid":{"rendered":"https:\/\/www.silicloud.com\/ja\/blog\/index.php\/2023\/11\/30\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/"},"modified":"2025-08-01T03:40:19","modified_gmt":"2025-07-31T18:40:19","slug":"jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","title":{"rendered":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"},"content":{"rendered":"<p>Jackson JSON Java \u30d1\u30fc\u30b5\u30fc\u306f\u975e\u5e38\u306b\u4eba\u6c17\u304c\u3042\u308a\u3001Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3082\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001Java JSON Processing API\u306f\u3042\u307e\u308a\u4f7f\u3044\u3084\u3059\u304f\u306a\u304f\u3001Json\u304b\u3089Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u81ea\u52d5\u5909\u63db\u3084\u305d\u306e\u9006\u306e\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u5e78\u3044\u306a\u3053\u3068\u306b\u3001JSON\u51e6\u7406\u306b\u4f7f\u7528\u3067\u304d\u308b\u4ee3\u66ffAPI\u304c\u3044\u304f\u3064\u304b\u3042\u308a\u307e\u3059\u3002\u524d\u306e\u8a18\u4e8b\u3067\u306fGoogle\u306eGson API\u306b\u3064\u3044\u3066\u5b66\u3073\u3001\u305d\u308c\u304c\u3069\u308c\u3060\u3051\u7c21\u5358\u306b\u4f7f\u7528\u3067\u304d\u308b\u304b\u3092\u898b\u307e\u3057\u305f\u3002<\/p>\n<h2>Jackson JSON Java Parser\u3092\u65e5\u672c\u8a9e\u3067\u8a00\u3044\u63db\u3048\u308b\u3068\u3001\u300c\u30b8\u30e3\u30af\u30bd\u30f3JSON Java\u30d1\u30fc\u30b5\u30fc\u300d\u3068\u306a\u308a\u307e\u3059\u3002<\/h2>\n<p>\u79c1\u305f\u3061\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067Jackson JSON Java API\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d3\u30eb\u30c9\u30d1\u30b9\u306b\u8ffd\u52a0\u3059\u308b\u304b\u3001\u3082\u3057\u304f\u306fMaven\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>&lt;dependency&gt;\r\n\t&lt;groupId&gt;com.fasterxml.jackson.core&lt;\/groupId&gt;\r\n\t&lt;artifactId&gt;jackson-databind&lt;\/artifactId&gt;\r\n\t&lt;version&gt;2.2.3&lt;\/version&gt;\r\n&lt;\/dependency&gt;\r\n<\/code><\/pre>\n<p>Jackson-Databind\u306ejar\u30d5\u30a1\u30a4\u30eb\u306f\u3001jackson-core\u304a\u3088\u3073jackson-annotations\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u4f9d\u5b58\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u3053\u308c\u3089\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30d3\u30eb\u30c9\u30d1\u30b9\u306b\u76f4\u63a5\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306f\u3001\u5fc5\u305a3\u3064\u3092\u3059\u3079\u3066\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u305d\u3046\u3057\u306a\u3044\u3068\u3001\u5b9f\u884c\u6642\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3059\u3002Jackson JSON Parser API\u306f\u3001JSON\u3092POJO\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u7c21\u5358\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u63d0\u4f9b\u3057\u3001JSON\u30c7\u30fc\u30bf\u304b\u3089Map\u3078\u306e\u7c21\u5358\u306a\u5909\u63db\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002Jackson\u306f\u30b8\u30a7\u30cd\u30ea\u30af\u30b9\u3082\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u304a\u308a\u3001JSON\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u76f4\u63a5\u5909\u63db\u3082\u884c\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30b8\u30e3\u30af\u30bd\u30f3\u306eJSON\u30b5\u30f3\u30d7\u30eb<\/h2>\n<p>JSON\u304b\u3089POJO\/Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u5909\u63db\u306e\u4f8b\u3068\u3057\u3066\u3001\u5165\u308c\u5b50\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u914d\u5217\u3092\u4f7f\u7528\u3057\u305f\u8907\u96d1\u306a\u4f8b\u3092\u53d6\u308a\u4e0a\u3052\u307e\u3059\u3002\u5909\u63db\u306b\u306f\u3001Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5185\u306e\u914d\u5217\u3001\u30ea\u30b9\u30c8\u3001\u30de\u30c3\u30d7\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u69cb\u9020\u3067employee.txt\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306b\u8907\u96d1\u306aJSON\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>{\r\n  \"id\": 123,\r\n  \"name\": \"Pankaj\",\r\n  \"permanent\": true,\r\n  \"address\": {\r\n    \"street\": \"Albany Dr\",\r\n    \"city\": \"San Jose\",\r\n    \"zipcode\": 95129\r\n  },\r\n  \"phoneNumbers\": [\r\n    123456,\r\n    987654\r\n  ],\r\n  \"role\": \"Manager\",\r\n  \"cities\": [\r\n    \"Los Angeles\",\r\n    \"New York\"\r\n  ],\r\n  \"properties\": {\r\n    \"age\": \"29 years\",\r\n    \"salary\": \"1000 USD\"\r\n  }\r\n}\r\n<\/code><\/pre>\n<p>\u79c1\u305f\u3061\u306b\u306f\u3001\u6b21\u306eJSON\u30c7\u30fc\u30bf\u306b\u5bfe\u5fdc\u3059\u308bJava\u30af\u30e9\u30b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.jackson.model;\r\n\r\npublic class Address {\r\n\t\r\n\tprivate String street;\r\n\tprivate String city;\r\n\tprivate int zipcode;\r\n\t\r\n\tpublic String getStreet() {\r\n\t\treturn street;\r\n\t}\r\n\tpublic void setStreet(String street) {\r\n\t\tthis.street = street;\r\n\t}\r\n\tpublic String getCity() {\r\n\t\treturn city;\r\n\t}\r\n\tpublic void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}\r\n\tpublic int getZipcode() {\r\n\t\treturn zipcode;\r\n\t}\r\n\tpublic void setZipcode(int zipcode) {\r\n\t\tthis.zipcode = zipcode;\r\n\t}\r\n\t\r\n\t@Override\r\n\tpublic String toString(){\r\n\t\treturn getStreet() + \", \"+getCity()+\", \"+getZipcode();\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u30a2\u30c9\u30ec\u30b9\u30af\u30e9\u30b9\u306f\u30eb\u30fc\u30c8\u306eJSON\u30c7\u30fc\u30bf\u5185\u306e\u5185\u90e8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.jackson.model;\r\n\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.Map;\r\n\r\npublic class Employee {\r\n\r\n\tprivate int id;\r\n\tprivate String name;\r\n\tprivate boolean permanent;\r\n\tprivate Address address;\r\n\tprivate long[] phoneNumbers;\r\n\tprivate String role;\r\n\tprivate List&lt;String&gt; cities;\r\n\tprivate Map&lt;String, String&gt; properties;\r\n\t\r\n\tpublic int getId() {\r\n\t\treturn id;\r\n\t}\r\n\tpublic void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}\r\n\tpublic String getName() {\r\n\t\treturn name;\r\n\t}\r\n\tpublic void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}\r\n\tpublic boolean isPermanent() {\r\n\t\treturn permanent;\r\n\t}\r\n\tpublic void setPermanent(boolean permanent) {\r\n\t\tthis.permanent = permanent;\r\n\t}\r\n\tpublic Address getAddress() {\r\n\t\treturn address;\r\n\t}\r\n\tpublic void setAddress(Address address) {\r\n\t\tthis.address = address;\r\n\t}\r\n\tpublic long[] getPhoneNumbers() {\r\n\t\treturn phoneNumbers;\r\n\t}\r\n\tpublic void setPhoneNumbers(long[] phoneNumbers) {\r\n\t\tthis.phoneNumbers = phoneNumbers;\r\n\t}\r\n\tpublic String getRole() {\r\n\t\treturn role;\r\n\t}\r\n\tpublic void setRole(String role) {\r\n\t\tthis.role = role;\r\n\t}\r\n\t\r\n\t@Override\r\n\tpublic String toString(){\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"***** Employee Details *****\\n\");\r\n\t\tsb.append(\"ID=\"+getId()+\"\\n\");\r\n\t\tsb.append(\"Name=\"+getName()+\"\\n\");\r\n\t\tsb.append(\"Permanent=\"+isPermanent()+\"\\n\");\r\n\t\tsb.append(\"Role=\"+getRole()+\"\\n\");\r\n\t\tsb.append(\"Phone Numbers=\"+Arrays.toString(getPhoneNumbers())+\"\\n\");\r\n\t\tsb.append(\"Address=\"+getAddress()+\"\\n\");\r\n\t\tsb.append(\"Cities=\"+Arrays.toString(getCities().toArray())+\"\\n\");\r\n\t\tsb.append(\"Properties=\"+getProperties()+\"\\n\");\r\n\t\tsb.append(\"*****************************\");\r\n\t\t\r\n\t\treturn sb.toString();\r\n\t}\r\n\tpublic List&lt;String&gt; getCities() {\r\n\t\treturn cities;\r\n\t}\r\n\tpublic void setCities(List&lt;String&gt; cities) {\r\n\t\tthis.cities = cities;\r\n\t}\r\n\tpublic Map&lt;String, String&gt; getProperties() {\r\n\t\treturn properties;\r\n\t}\r\n\tpublic void setProperties(Map&lt;String, String&gt; properties) {\r\n\t\tthis.properties = properties;\r\n\t}\r\n}\r\n<\/code><\/pre>\n<p>\u5f93\u696d\u54e1\u306f\u30eb\u30fc\u30c8\u306eJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8868\u3059Java Bean\u3067\u3059\u3002\u3055\u3066\u3001Jackson JSON\u30d1\u30fc\u30b5\u30fcAPI\u3092\u4f7f\u7528\u3057\u3066JSON\u3092Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u65b9\u6cd5\u3092\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.jackson.json;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.io.StringWriter;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Paths;\r\nimport java.util.ArrayList;\r\nimport java.util.HashMap;\r\nimport java.util.Iterator;\r\nimport java.util.List;\r\nimport java.util.Map;\r\n\r\nimport com.fasterxml.jackson.core.type.TypeReference;\r\nimport com.fasterxml.jackson.databind.JsonNode;\r\nimport com.fasterxml.jackson.databind.ObjectMapper;\r\nimport com.fasterxml.jackson.databind.SerializationFeature;\r\nimport com.fasterxml.jackson.databind.node.ObjectNode;\r\nimport com.scdev.jackson.model.Address;\r\nimport com.scdev.jackson.model.Employee;\r\n\r\n\r\npublic class JacksonObjectMapperExample {\r\n\r\n\tpublic static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\t\/\/read json file data to String\r\n\t\tbyte[] jsonData = Files.readAllBytes(Paths.get(\"employee.txt\"));\r\n\t\t\r\n\t\t\/\/create ObjectMapper instance\r\n\t\tObjectMapper objectMapper = new ObjectMapper();\r\n\t\t\r\n\t\t\/\/convert json string to object\r\n\t\tEmployee emp = objectMapper.readValue(jsonData, Employee.class);\r\n\t\t\r\n\t\tSystem.out.println(\"Employee Object\\n\"+emp);\r\n\t\t\r\n\t\t\/\/convert Object to json string\r\n\t\tEmployee emp1 = createEmployee();\r\n\t\t\/\/configure Object mapper for pretty print\r\n\t\tobjectMapper.configure(SerializationFeature.INDENT_OUTPUT, true);\r\n\t\t\r\n\t\t\/\/writing to console, can write to any output stream such as file\r\n\t\tStringWriter stringEmp = new StringWriter();\r\n\t\tobjectMapper.writeValue(stringEmp, emp1);\r\n\t\tSystem.out.println(\"Employee JSON is\\n\"+stringEmp);\r\n\t}\r\n\t\r\n\tpublic static Employee createEmployee() {\r\n\r\n\t\tEmployee emp = new Employee();\r\n\t\temp.setId(100);\r\n\t\temp.setName(\"David\");\r\n\t\temp.setPermanent(false);\r\n\t\temp.setPhoneNumbers(new long[] { 123456, 987654 });\r\n\t\temp.setRole(\"Manager\");\r\n\r\n\t\tAddress add = new Address();\r\n\t\tadd.setCity(\"Bangalore\");\r\n\t\tadd.setStreet(\"BTM 1st Stage\");\r\n\t\tadd.setZipcode(560100);\r\n\t\temp.setAddress(add);\r\n\r\n\t\tList&lt;String&gt; cities = new ArrayList&lt;String&gt;();\r\n\t\tcities.add(\"Los Angeles\");\r\n\t\tcities.add(\"New York\");\r\n\t\temp.setCities(cities);\r\n\r\n\t\tMap&lt;String, String&gt; props = new HashMap&lt;String, String&gt;();\r\n\t\tprops.put(\"salary\", \"1000 Rs\");\r\n\t\tprops.put(\"age\", \"28 years\");\r\n\t\temp.setProperties(props);\r\n\r\n\t\treturn emp;\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>Employee Object\r\n***** Employee Details *****\r\nID=123\r\nName=Pankaj\r\nPermanent=true\r\nRole=Manager\r\nPhone Numbers=[123456, 987654]\r\nAddress=Albany Dr, San Jose, 95129\r\nCities=[Los Angeles, New York]\r\nProperties={age=29 years, salary=1000 USD}\r\n*****************************\r\nEmployee JSON is\r\n\/\/printing same as above json file data\r\n<\/code><\/pre>\n<p>com.fasterxml.jackson.databind.ObjectMapper\u306fJackson API\u3067\u6700\u3082\u91cd\u8981\u306a\u30af\u30e9\u30b9\u3067\u3042\u308a\u3001JSON\u3092Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308breadValue()\u30e1\u30bd\u30c3\u30c9\u3068\u3001Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092JSON\u306b\u5909\u63db\u3059\u308bwriteValue()\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002ObjectMapper\u30af\u30e9\u30b9\u306f\u518d\u5229\u7528\u304c\u53ef\u80fd\u3067\u3042\u308a\u3001\u30b7\u30f3\u30b0\u30eb\u30c8\u30f3\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u3057\u30661\u5ea6\u3060\u3051\u521d\u671f\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002readValue()\u30e1\u30bd\u30c3\u30c9\u3068writeValue()\u30e1\u30bd\u30c3\u30c9\u306b\u306f\u3001\u30d0\u30a4\u30c8\u914d\u5217\u3001\u30d5\u30a1\u30a4\u30eb\u3001\u5165\u51fa\u529b\u30b9\u30c8\u30ea\u30fc\u30e0\u3001\u304a\u3088\u3073\u30ea\u30fc\u30c0\u30fc\/\u30e9\u30a4\u30bf\u30fc\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u7528\u3059\u308b\u305f\u3081\u306e\u591a\u304f\u306e\u30aa\u30fc\u30d0\u30fc\u30ed\u30fc\u30c9\u3055\u308c\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>Jackson JSON &#8211; JSON\u3092\u30de\u30c3\u30d7\u306b\u5909\u63db\u3059\u308b<\/h3>\n<p>\u6642\u3005\u3001data.txt\u30d5\u30a1\u30a4\u30eb\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306aJSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>{\r\n  \"name\": \"David\",\r\n  \"role\": \"Manager\",\r\n  \"city\": \"Los Angeles\"\r\n}\r\n<\/code><\/pre>\n<p>\u305d\u3057\u3066\u3001\u79c1\u305f\u3061\u306f\u305d\u308c\u3092\u30de\u30c3\u30d7\u306b\u5909\u63db\u3057\u305f\u3044\u3001\u305d\u3057\u3066\u540c\u3058\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u30ad\u30fc\u3092\u6301\u3064Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u306f\u306a\u304f\u3002\u79c1\u305f\u3061\u306f\u3001\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3067Jackson JSON API\u3092\u4f7f\u3063\u3066\u3068\u3066\u3082\u7c21\u5358\u306b\u305d\u308c\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>\/\/converting json to Map\r\nbyte[] mapData = Files.readAllBytes(Paths.get(\"data.txt\"));\r\nMap&lt;String,String&gt; myMap = new HashMap&lt;String, String&gt;();\r\n\r\nObjectMapper objectMapper = new ObjectMapper();\r\nmyMap = objectMapper.readValue(mapData, HashMap.class);\r\nSystem.out.println(\"Map is: \"+myMap);\r\n\r\n\/\/another way\r\nmyMap = objectMapper.readValue(mapData, new TypeReference&lt;HashMap&lt;String,String&gt;&gt;() {});\r\nSystem.out.println(\"Map using TypeReference: \"+myMap);\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30b9\u30cb\u30da\u30c3\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>Map is: {name=David, role=Manager, city=Los Angeles}\r\nMap using TypeReference: {name=David, role=Manager, city=Los Angeles}\r\n<\/code><\/pre>\n<h3>Jackson JSON &#8211; \u7279\u5b9a\u306eJSON\u30ad\u30fc\u306e\u8aad\u307f\u8fbc\u307f<\/h3>\n<p>\u6642\u306b\u306f\u79c1\u305f\u3061\u306b\u306fJSON\u30c7\u30fc\u30bf\u304c\u3042\u308a\u3001\u79c1\u305f\u3061\u306f\u305d\u306e\u3046\u3061\u306e\u307b\u3093\u306e\u3044\u304f\u3064\u304b\u306e\u30ad\u30fc\u306e\u5024\u306b\u8208\u5473\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001JSON\u5168\u4f53\u3092\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5909\u63db\u3059\u308b\u306e\u306f\u826f\u3044\u30a2\u30a4\u30c7\u30a2\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002Jackson JSON API\u3067\u306f\u3001DOM\u30d1\u30fc\u30b5\u306e\u3088\u3046\u306a\u30c4\u30ea\u30fc\u5f62\u5f0f\u3067JSON\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u53d6\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u63d0\u4f9b\u3055\u308c\u3066\u304a\u308a\u3001\u3053\u308c\u3092\u901a\u3058\u3066JSON\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u7279\u5b9a\u306e\u8981\u7d20\u3092\u8aad\u307f\u53d6\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001JSON\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u7279\u5b9a\u306e\u30a8\u30f3\u30c8\u30ea\u3092\u8aad\u307f\u53d6\u308b\u305f\u3081\u306e\u30b9\u30cb\u30da\u30c3\u30c8\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>\/\/read json file data to String\r\nbyte[] jsonData = Files.readAllBytes(Paths.get(\"employee.txt\"));\r\n\r\n\/\/create ObjectMapper instance\r\nObjectMapper objectMapper = new ObjectMapper();\r\n\r\n\/\/read JSON like DOM Parser\r\nJsonNode rootNode = objectMapper.readTree(jsonData);\r\nJsonNode idNode = rootNode.path(\"id\");\r\nSystem.out.println(\"id = \"+idNode.asInt());\r\n\r\nJsonNode phoneNosNode = rootNode.path(\"phoneNumbers\");\r\nIterator&lt;JsonNode&gt; elements = phoneNosNode.elements();\r\nwhile(elements.hasNext()){\r\n\tJsonNode phone = elements.next();\r\n\tSystem.out.println(\"Phone No = \"+phone.asLong());\r\n}\r\n<\/code><\/pre>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u30b9\u30cb\u30da\u30c3\u30c8\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u4ee5\u4e0b\u306e\u51fa\u529b\u304c\u5f97\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>id = 123\r\nPhone No = 123456\r\nPhone No = 987654\r\n<\/code><\/pre>\n<h3>Jackson JSON &#8211; JSON\u6587\u66f8\u306e\u7de8\u96c6<\/h3>\n<p>Jackson JSON Java API\u306f\u3001JSON\u30c7\u30fc\u30bf\u306b\u30ad\u30fc\u3092\u8ffd\u52a0\u3001\u7de8\u96c6\u3001\u524a\u9664\u3059\u308b\u305f\u3081\u306e\u4fbf\u5229\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u3001\u305d\u308c\u3092\u65b0\u3057\u3044JSON\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u4fdd\u5b58\u3057\u305f\u308a\u3001\u4efb\u610f\u306e\u30b9\u30c8\u30ea\u30fc\u30e0\u306b\u66f8\u304d\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306f\u3001\u3053\u308c\u3092\u7c21\u5358\u306b\u884c\u3046\u65b9\u6cd5\u3092\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>byte[] jsonData = Files.readAllBytes(Paths.get(\"employee.txt\"));\r\n\r\nObjectMapper objectMapper = new ObjectMapper();\r\n\r\n\/\/create JsonNode\r\nJsonNode rootNode = objectMapper.readTree(jsonData);\r\n\r\n\/\/update JSON data\r\n((ObjectNode) rootNode).put(\"id\", 500);\r\n\/\/add new key value\r\n((ObjectNode) rootNode).put(\"test\", \"test value\");\r\n\/\/remove existing key\r\n((ObjectNode) rootNode).remove(\"role\");\r\n((ObjectNode) rootNode).remove(\"properties\");\r\nobjectMapper.writeValue(new File(\"updated_emp.txt\"), rootNode);\r\n<\/code><\/pre>\n<p>\u3082\u3057\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3057\u3001\u65b0\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059\u3068\u3001&#8221;role&#8221;\u3068&#8221;properties&#8221;\u306e\u30ad\u30fc\u304c\u5b58\u5728\u3057\u306a\u3044\u3053\u3068\u306b\u6c17\u3065\u304f\u3067\u3057\u3087\u3046\u3002\u3055\u3089\u306b\u3001&#8221;id&#8221;\u306e\u5024\u304c500\u306b\u66f4\u65b0\u3055\u308c\u3001&#8221;test&#8221;\u3068\u3044\u3046\u65b0\u3057\u3044\u30ad\u30fc\u304cupdated_emp.txt\u30d5\u30a1\u30a4\u30eb\u306b\u8ffd\u52a0\u3055\u308c\u3066\u3044\u308b\u3053\u3068\u3082\u6c17\u3065\u304f\u3067\u3057\u3087\u3046\u3002<\/p>\n<h3>Jackson JSON Streaming API\u306e\u4f8b<\/h3>\n<p>\u30b8\u30e3\u30af\u30bd\u30f3\u306eJSON Java API\u306b\u306f\u3001\u5927\u304d\u306aJSON\u30c7\u30fc\u30bf\u3092\u6271\u3046\u969b\u306b\u5f79\u7acb\u3064\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0\u30b5\u30dd\u30fc\u30c8\u3082\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30b5\u30dd\u30fc\u30c8\u306b\u3088\u308a\u3001API\u306f\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u3092\u30c8\u30fc\u30af\u30f3\u3068\u3057\u3066\u8aad\u307f\u8fbc\u307f\u3001\u3088\u308a\u5c11\u306a\u3044\u30e1\u30e2\u30ea\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0API\u306e\u552f\u4e00\u306e\u554f\u984c\u306f\u3001JSON\u30c7\u30fc\u30bf\u3092\u89e3\u6790\u3059\u308b\u969b\u306b\u3059\u3079\u3066\u306e\u30c8\u30fc\u30af\u30f3\u306b\u6ce8\u610f\u3092\u6255\u3046\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u3067\u3059\u3002\u4f8b\u3048\u3070\u3001{ &#8220;role&#8221;: &#8220;Manager&#8221; }\u3068\u3044\u3046JSON\u30c7\u30fc\u30bf\u304c\u3042\u308b\u3068\u3001\u9806\u756a\u306b\u6b21\u306e\u30c8\u30fc\u30af\u30f3\u304c\u5f97\u3089\u308c\u307e\u3059 &#8211; {\uff08\u958b\u59cb\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u3001&#8221;role&#8221;\uff08\u30ad\u30fc\u540d\uff09\u3001&#8221;Manager&#8221;\uff08\u30ad\u30fc\u306e\u5024\uff09\u304a\u3088\u3073}\uff08\u7d42\u4e86\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u3002\u30b3\u30ed\u30f3\uff08:\uff09\u306fJSON\u306e\u533a\u5207\u308a\u8a18\u53f7\u3067\u3042\u308a\u3001\u30c8\u30fc\u30af\u30f3\u3068\u306f\u898b\u306a\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.jackson.json;\r\n\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.ArrayList;\r\nimport java.util.HashMap;\r\nimport java.util.List;\r\n\r\nimport com.fasterxml.jackson.core.JsonFactory;\r\nimport com.fasterxml.jackson.core.JsonParseException;\r\nimport com.fasterxml.jackson.core.JsonParser;\r\nimport com.fasterxml.jackson.core.JsonToken;\r\nimport com.scdev.jackson.model.Address;\r\nimport com.scdev.jackson.model.Employee;\r\n\r\npublic class JacksonStreamingReadExample {\r\n\r\n\tpublic static void main(String[] args) throws JsonParseException, IOException {\r\n\t\t\r\n\t\t\/\/create JsonParser object\r\n\t\tJsonParser jsonParser = new JsonFactory().createParser(new File(\"employee.txt\"));\r\n\t\t\r\n\t\t\/\/loop through the tokens\r\n\t\tEmployee emp = new Employee();\r\n\t\tAddress address = new Address();\r\n\t\temp.setAddress(address);\r\n\t\temp.setCities(new ArrayList&lt;String&gt;());\r\n\t\temp.setProperties(new HashMap&lt;String, String&gt;());\r\n\t\tList&lt;Long&gt; phoneNums = new ArrayList&lt;Long&gt;();\r\n\t\tboolean insidePropertiesObj=false;\r\n\t\t\r\n\t\tparseJSON(jsonParser, emp, phoneNums, insidePropertiesObj);\r\n\t\t\r\n\t\tlong[] nums = new long[phoneNums.size()];\r\n\t\tint index = 0;\r\n\t\tfor(Long l :phoneNums){\r\n\t\t\tnums[index++] = l;\r\n\t\t}\r\n\t\temp.setPhoneNumbers(nums);\r\n\t\t\r\n\t\tjsonParser.close();\r\n\t\t\/\/print employee object\r\n\t\tSystem.out.println(\"Employee Object\\n\\n\"+emp);\r\n\t}\r\n\r\n\tprivate static void parseJSON(JsonParser jsonParser, Employee emp,\r\n\t\t\tList&lt;Long&gt; phoneNums, boolean insidePropertiesObj) throws JsonParseException, IOException {\r\n\t\t\r\n\t\t\/\/loop through the JsonTokens\r\n\t\twhile(jsonParser.nextToken() != JsonToken.END_OBJECT){\r\n\t\t\tString name = jsonParser.getCurrentName();\r\n\t\t\tif(\"id\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\temp.setId(jsonParser.getIntValue());\r\n\t\t\t}else if(\"name\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\temp.setName(jsonParser.getText());\r\n\t\t\t}else if(\"permanent\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\temp.setPermanent(jsonParser.getBooleanValue());\r\n\t\t\t}else if(\"address\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\t\/\/nested object, recursive call\r\n\t\t\t\tparseJSON(jsonParser, emp, phoneNums, insidePropertiesObj);\r\n\t\t\t}else if(\"street\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\temp.getAddress().setStreet(jsonParser.getText());\r\n\t\t\t}else if(\"city\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\temp.getAddress().setCity(jsonParser.getText());\r\n\t\t\t}else if(\"zipcode\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\temp.getAddress().setZipcode(jsonParser.getIntValue());\r\n\t\t\t}else if(\"phoneNumbers\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\twhile (jsonParser.nextToken() != JsonToken.END_ARRAY) {\r\n\t\t\t\t\tphoneNums.add(jsonParser.getLongValue());\r\n\t\t\t\t}\r\n\t\t\t}else if(\"role\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\temp.setRole(jsonParser.getText());\r\n\t\t\t}else if(\"cities\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\twhile (jsonParser.nextToken() != JsonToken.END_ARRAY) {\r\n\t\t\t\t\temp.getCities().add(jsonParser.getText());\r\n\t\t\t\t}\r\n\t\t\t}else if(\"properties\".equals(name)){\r\n\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\twhile(jsonParser.nextToken() != JsonToken.END_OBJECT){\r\n\t\t\t\t\tString key = jsonParser.getCurrentName();\r\n\t\t\t\t\tjsonParser.nextToken();\r\n\t\t\t\t\tString value = jsonParser.getText();\r\n\t\t\t\t\temp.getProperties().put(key, value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>JsonParser\u306f\u3001Jackson\u306eJSON\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0API\u3067\u3042\u308a\u3001\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u53d6\u308b\u305f\u3081\u306b\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002\u305d\u3057\u3066parseJSON()\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u30c8\u30fc\u30af\u30f3\u3092\u30eb\u30fc\u30d7\u3057\u3066\u51e6\u7406\u3057\u3001Java\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300caddress\u300d\u306f\u30cd\u30b9\u30c8\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3042\u308b\u305f\u3081\u3001parseJSON()\u30e1\u30bd\u30c3\u30c9\u304c\u518d\u5e30\u7684\u306b\u547c\u3073\u51fa\u3055\u308c\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u914d\u5217\u3092\u89e3\u6790\u3059\u308b\u305f\u3081\u306b\u3001JSON\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u30eb\u30fc\u30d7\u3057\u3066\u3044\u307e\u3059\u3002\u30b9\u30c8\u30ea\u30fc\u30df\u30f3\u30b0API\u3092\u4f7f\u7528\u3057\u3066JSON\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3059\u308b\u305f\u3081\u306b\u306f\u3001JsonGenerator\u30af\u30e9\u30b9\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre class=\"post-pre\"><code>package com.scdev.jackson.json;\r\n\r\nimport java.io.FileOutputStream;\r\nimport java.io.IOException;\r\nimport java.util.Set;\r\n\r\nimport com.fasterxml.jackson.core.JsonFactory;\r\nimport com.fasterxml.jackson.core.JsonGenerator;\r\nimport com.fasterxml.jackson.core.util.DefaultPrettyPrinter;\r\nimport com.scdev.jackson.model.Employee;\r\n\r\npublic class JacksonStreamingWriteExample {\r\n\r\n\tpublic static void main(String[] args) throws IOException {\r\n\t\tEmployee emp = JacksonObjectMapperExample.createEmployee();\r\n\r\n\t\tJsonGenerator jsonGenerator = new JsonFactory()\r\n\t\t\t\t.createGenerator(new FileOutputStream(\"stream_emp.txt\"));\r\n\t\t\/\/for pretty printing\r\n\t\tjsonGenerator.setPrettyPrinter(new DefaultPrettyPrinter());\r\n\t\t\r\n\t\tjsonGenerator.writeStartObject(); \/\/ start root object\r\n\t\tjsonGenerator.writeNumberField(\"id\", emp.getId());\r\n\t\tjsonGenerator.writeStringField(\"name\", emp.getName());\r\n\t\tjsonGenerator.writeBooleanField(\"permanent\", emp.isPermanent());\r\n\t\t\r\n\t\tjsonGenerator.writeObjectFieldStart(\"address\"); \/\/start address object\r\n\t\t\tjsonGenerator.writeStringField(\"street\", emp.getAddress().getStreet());\r\n\t\t\tjsonGenerator.writeStringField(\"city\", emp.getAddress().getCity());\r\n\t\t\tjsonGenerator.writeNumberField(\"zipcode\", emp.getAddress().getZipcode());\r\n\t\tjsonGenerator.writeEndObject(); \/\/end address object\r\n\t\t\r\n\t\tjsonGenerator.writeArrayFieldStart(\"phoneNumbers\");\r\n\t\t\tfor(long num : emp.getPhoneNumbers())\r\n\t\t\t\tjsonGenerator.writeNumber(num);\r\n\t\tjsonGenerator.writeEndArray();\r\n\t\t\r\n\t\tjsonGenerator.writeStringField(\"role\", emp.getRole());\r\n\t\t\r\n\t\tjsonGenerator.writeArrayFieldStart(\"cities\"); \/\/start cities array\r\n\t\tfor(String city : emp.getCities())\r\n\t\t\tjsonGenerator.writeString(city);\r\n\t\tjsonGenerator.writeEndArray(); \/\/closing cities array\r\n\t\t\r\n\t\tjsonGenerator.writeObjectFieldStart(\"properties\");\r\n\t\t\tSet&lt;String&gt; keySet = emp.getProperties().keySet();\r\n\t\t\tfor(String key : keySet){\r\n\t\t\t\tString value = emp.getProperties().get(key);\r\n\t\t\t\tjsonGenerator.writeStringField(key, value);\r\n\t\t\t}\r\n\t\tjsonGenerator.writeEndObject(); \/\/closing properties\r\n\t\tjsonGenerator.writeEndObject(); \/\/closing root object\r\n\t\t\r\n\t\tjsonGenerator.flush();\r\n\t\tjsonGenerator.close();\r\n\t}\r\n\r\n}\r\n<\/code><\/pre>\n<p>JsonGenerator\u306fJsonParser\u306b\u6bd4\u3079\u3066\u4f7f\u3044\u3084\u3059\u3044\u3067\u3059\u3002\u3053\u308c\u306fJackson JSON Parser Java API\u306e\u30af\u30a4\u30c3\u30af\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u3064\u3044\u3066\u306e\u8aac\u660e\u3067\u3059\u3002Jackson JSON Java API\u306f\u4f7f\u3044\u3084\u3059\u304f\u3001JSON\u30c7\u30fc\u30bf\u3092\u6271\u3046\u958b\u767a\u8005\u306e\u5229\u4fbf\u6027\u306e\u305f\u3081\u306b\u591a\u304f\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u304b\u3089\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3001\u64cd\u4f5c\u3057\u3066Jackson Json API\u306b\u3064\u3044\u3066\u3055\u3089\u306b\u591a\u304f\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u63a2\u7d22\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>Jackson JSON\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/p>\n<p>\u53c2\u7167: \u30b8\u30e3\u30af\u30bd\u30f3\u306eGitHub\u30da\u30fc\u30b8<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jackson JSON Java \u30d1\u30fc\u30b5\u30fc\u306f\u975e\u5e38\u306b\u4eba\u6c17\u304c\u3042\u308a\u3001Spring\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3082\u4f7f\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u3001Java JSON Processing API\u306f\u3042\u307e\u308a\u4f7f\u3044\u3084\u3059\u304f\u306a\u304f\u3001Json\u304b\u3089Java\u30aa\u30d6\u30b8\u30a7 [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[26,61],"class_list":["post-936","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-26","tag-61"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-\u30d1\u30fc\u30b5\u30fc-api-\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" \/>\n<meta property=\"og:description\" content=\"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-\u30d1\u30fc\u30b5\u30fc-api-\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-18T06:23:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-31T18:40:19+00:00\" \/>\n<meta name=\"author\" content=\"\u5149, \u660e\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u5149, \u660e\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"35\u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\",\"name\":\"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\"},\"datePublished\":\"2023-06-18T06:23:04+00:00\",\"dateModified\":\"2025-07-31T18:40:19+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55\"},\"description\":\"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/ja\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"ja\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55\",\"name\":\"\u5149, \u660e\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g\",\"caption\":\"\u5149, \u660e\"},\"url\":\"https:\/\/www.silicloud.com\/ja\/blog\/author\/hikariakira\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","description":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-\u30d1\u30fc\u30b5\u30fc-api-\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/","og_locale":"ja_JP","og_type":"article","og_title":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb","og_description":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","og_url":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-\u30d1\u30fc\u30b5\u30fc-api-\u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-06-18T06:23:04+00:00","article_modified_time":"2025-07-31T18:40:19+00:00","author":"\u5149, \u660e","twitter_card":"summary_large_image","twitter_misc":{"\u57f7\u7b46\u8005":"\u5149, \u660e","\u63a8\u5b9a\u8aad\u307f\u53d6\u308a\u6642\u9593":"35\u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","url":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/","name":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website"},"datePublished":"2023-06-18T06:23:04+00:00","dateModified":"2025-07-31T18:40:19+00:00","author":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55"},"description":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3002\u5b9f\u8df5\u7684\u306a\u4f8b\u3068\u30b3\u30fc\u30c9\u3001\u6ce8\u610f\u70b9\u3092\u542b\u3081\u3066\u521d\u5fc3\u8005\u306b\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u8aac\u660e\u3057\u307e\u3059\u3002","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/ja\/blog\/"},{"@type":"ListItem","position":2,"name":"Jackson JSON Java \u30d1\u30fc\u30b5\u30fc API \u306e\u4f8b\u306b\u3064\u3044\u3066\u306e\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#website","url":"https:\/\/www.silicloud.com\/ja\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"ja"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/9ee62cea876d247deba14a0ac7ba5b55","name":"\u5149, \u660e","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3dffb6c754b95e3fbdcd8973f4375ff9dd10d41e4f6632ad08d4d59ccc35af8d?s=96&d=mm&r=g","caption":"\u5149, \u660e"},"url":"https:\/\/www.silicloud.com\/ja\/blog\/author\/hikariakira\/"},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.silicloud.com\/ja\/blog\/jackson-json-java-%e3%83%91%e3%83%bc%e3%82%b5%e3%83%bc-api-%e3%81%ae%e4%be%8b%e3%81%ab%e3%81%a4%e3%81%84%e3%81%a6%e3%81%ae%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/936","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/comments?post=936"}],"version-history":[{"count":1,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/936\/revisions"}],"predecessor-version":[{"id":46868,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/posts\/936\/revisions\/46868"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/media?parent=936"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/categories?post=936"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/ja\/blog\/wp-json\/wp\/v2\/tags?post=936"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}