Commit 6418f2c2 by Venkatesh Seetharam

Remove pretty print for JSON Deserialization. Contributed by Venkatesh Seetharam

parent 953ceabb
......@@ -24,7 +24,7 @@ import org.apache.hadoop.metadata.types.DataTypes.{ArrayType, MapType, TypeCateg
import org.apache.hadoop.metadata.types._
import org.json4s.JsonAST.JInt
import org.json4s._
import org.json4s.native.Serialization.{write => swrite, _}
import org.json4s.native.Serialization._
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
......@@ -268,6 +268,13 @@ object Serialization {
implicit val formats = org.json4s.native.Serialization.formats(NoTypeHints) + new TypedStructSerializer +
new TypedReferenceableInstanceSerializer + new BigDecimalSerializer + new BigIntegerSerializer
write(value)
}
def toJsonPretty(value : ITypedReferenceableInstance) : String = {
implicit val formats = org.json4s.native.Serialization.formats(NoTypeHints) + new TypedStructSerializer +
new TypedReferenceableInstanceSerializer + new BigDecimalSerializer + new BigIntegerSerializer
writePretty(value)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment