I personally have no experience with Json on PostgreSQL or Maria dynamic columns. Looks like SQL databases have some NoSQL tricks up their sleeves.
ActiveJDBC does not support JSON type in PostgrreSQL, or dynamic columns in MariaDB, which means that you will have to write custom code for any.
I personally would choose MariaDB, only because I'm more familiar with it. Learning a new DB might take more time. However, your experience might be different.
Not sure if this is helping you though...