JSON transform function
Currently JSON transformations are done with 'map' function. E.g.:
json. map {
case JString(s) => JInt(s.toInt)
case x => x
}
Add a helper function which takes partial function instead:
json. transform {
case JString(s) => JInt(s.toInt)
}
json. map {
case JString(s) => JInt(s.toInt)
case x => x
}
Add a helper function which takes partial function instead:
json. transform {
case JString(s) => JInt(s.toInt)
}
Leave a comment