Skip to content

Commit d353eb7

Browse files
authored
Allow Play to use parseMathContextValue (#1255)
1 parent cad389b commit d353eb7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

play-json/jvm/src/main/scala/play/api/libs/json/JsonConfig.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,9 @@ object JsonConfig {
256256
): JsonConfig =
257257
JsonConfigImpl(bigDecimalParseConfig, bigDecimalSerializerConfig, streamReadConstraints, streamWriteConstraints)
258258

259-
private[json] def parseMathContext(key: String): MathContext = sys.props.get(key).map(_.toLowerCase) match {
259+
private[json] def parseMathContext(key: String): MathContext = parseMathContextValue(sys.props.get(key))
260+
261+
private[play] def parseMathContextValue(value: Option[String]): MathContext = value.map(_.toLowerCase) match {
260262
case Some("decimal128") => MathContext.DECIMAL128
261263
case Some("decimal64") => MathContext.DECIMAL64
262264
case Some("decimal32") => MathContext.DECIMAL32

0 commit comments

Comments
 (0)