Changed bottle json to dict from function.