What is better datatype: JSON vs. LinkedHashMap

Hi,

I am working with the ExternalTask pattern in python. I have variables of type dictionary (“Map” for java developers :wink: ).

When I send the dictionary to Camunda, the variable is correctly serialized as LinkedHashMap.

In Cockpit is a bit inconvenient when checking the value of a LinkedHashMap (you have to click on it and check the deserialized tile in the popup).

So, I was thinking, I could declare the dictionary as datatype json. It works well. I can view the json in Cockpit now.

My question is: what drawbacks do I have to expect?

For instance, I want to implement a form for user task where users can modify values of that json/map. Do I have to expect drawbacks one way or the other?

Regards,
Markus

They are both stored as bytearrays in the dB.

The Json should have better serialization speed as the Java serializable capability is ~slow.

If you have other apps connecting to the Camunda API then storing as Json is likely a better fit.

2 Likes

Would it be worthwhile to make JSON the default for collections such as list an maps?