Restructure the valid_paths list into a dict.
And... functions are not json serializable.