3
kart42
1y

*Python:*

```
d = json.loads(str)
d['foo'] = bar
json.dumps(d)
```

*Scala:*
```
Caused by: TimerException{org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `scala.collection.immutable.Map` (no Creators, like default constructor, exist): abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [Source: UNKNOWN; line: 1, column: 1]}
... 15 more
```

Comments
  • 0
    Python JSON fails flat for types that do not exist in JSON, like Set. Own encoder needed.

    But yeah... The scala eco system is imho clusterfuck, especially SBT.

    Though Jacksons error messages are bleh, I like Jackson itself.
  • 0
    @IntrusionCM Why not cast it to dict?
Add Comment