[ 
https://issues.apache.org/jira/browse/HADOOP-19951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18101562#comment-18101562
 ] 

ASF GitHub Bot commented on HADOOP-19951:
-----------------------------------------

pan3793 commented on code in PR #8654:
URL: https://github.com/apache/hadoop/pull/8654#discussion_r3709091131


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/HadoopJsonUtils.java:
##########
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.util;
+
+import java.io.IOException;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.classification.InterfaceStability;
+
+/**
+ * Simple JSON utility to replace usage of the removed
+ * {@code org.eclipse.jetty.util.ajax.JSON} class.
+ * Mainly used in tests and is not a public API.
+ *
+ * Uses Jackson {@link ObjectMapper} under the hood.
+ */
[email protected]
[email protected]
+public final class HadoopJsonUtils {

Review Comment:
   can we just call it `JsonUtil` or `JsonUtils` ? - there are no existing 
classes under this folder that start with `Hadoop*`





> Drop use of jetty-util-ajax and use jackson instead
> ---------------------------------------------------
>
>                 Key: HADOOP-19951
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19951
>             Project: Hadoop Common
>          Issue Type: Task
>            Reporter: PJ Fanning
>            Priority: Major
>              Labels: pull-request-available
>
> Hadoop uses jetty-util-ajax in a few modules to read and write JSON.
> This lib is abandoned and it is easy to switch to Jackson.
> This is a part of HADOOP-19912 that can be split out and it doesn't cause the 
> same issues with worrying about jar compatibilities - it actually simplifies 
> the build by removing a dependency.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to