In order to make it easier to serialize a Road object, we could add a new to_json() method to the Road class (similar to here).
Then we could call it's new to_json() method from the match to_json() method (shown above) to get all the road information when we convert a match to json.
In order to make it easier to serialize a Road object, we could add a new
to_json()
method to the Road class (similar to here).Then we could call it's new
to_json()
method from the matchto_json()
method (shown above) to get all the road information when we convert a match to json.