Add migration support for json

Adapted from hstore migration