serialize json from python dict