Add toy json_to_struct function.