[JSON] Build Nested ObjectNode
다음과 같이 object가 중첩된 json을 만들어 보자. { "employee" : { "company" : "MyCom" , "teams" : { "team1" : { "name" : "AAAA" , "location" : "sector-a" }, "team2" : { "name" : "BBBB" , "location" : "sector-b" } } } } Jackson 코드는 아래와 같다. ObjectMapper mapper = new ObjectMapper (); ObjectNode root = mapper . createObjectNode (); ObjectNode employee = root . putObject ( "employee" ); emplyee . put ( "compayn" , "MyCom" ); ObjectNode teams = employee . putObject ( "teams" ); ObjectNode team1 = teams . putObject ( "team1" ); team1 . put ( "name" , "AAAA" ); team1 . put ( "location" , ...