Resolve DB migration script issue and use json library

Get rid of multiple branches. Remove dependency on jsonutils and isntead
use json.dumps