Converts hashmap to json (commented out so that code works)