input: Write a python function to convert a Person object to a JSON string and back to a Person object.
  assert person_to_json(Person("Alice", 30)) == '{"name": "Alice", "age": 30}'
  assert person_from_json('{"name": "Alice", "age": 30}').name == "Alice"
  assert person_from_json('{"name": "Alice", "age": 30}').age == 30
output: import json
  from dataclasses import dataclass
  
  @dataclass
  class Person:
      name: str
      age: int
  
  def person_to_json(person: Person) -> str:
      return json.dumps({"name": person.name, "age": person.age})
  
  def person_from_json(json_str: str) -> Person:
      data = json.loads(json_str)
      return Person(name=data["name"], age=data["age"])