Package org.apache.spark.sql.streaming
Class SafeJsonSerializer
Object
org.apache.spark.sql.streaming.SafeJsonSerializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.json4s.JsonAST.JValue
safeDoubleToJValue
(double value) static <T> org.json4s.JsonAST.JValue
safeMapToJValue
(Map<String, T> map, scala.Function1<T, org.json4s.JsonAST.JValue> valueToJValue) Convert map to JValue while handling empty maps.
-
Constructor Details
-
SafeJsonSerializer
public SafeJsonSerializer()
-
-
Method Details
-
safeDoubleToJValue
public static org.json4s.JsonAST.JValue safeDoubleToJValue(double value) -
safeMapToJValue
public static <T> org.json4s.JsonAST.JValue safeMapToJValue(Map<String, T> map, scala.Function1<T, org.json4s.JsonAST.JValue> valueToJValue) Convert map to JValue while handling empty maps. Also, this sorts the keys.
-