Java class design

I have to give a JSON answer. I'm using jackson to convert the class to json. I have a basic class of java. I need to add some extra fields to the existing base class to give my answer json. I came with two ideas.

  1. To extend the main Java class.
  2. Have another class with the class object as a constructor.

Concerns about two methods are:

  1. I have a base layer that returns a Java database object. I need to call a method to return my extended class object. In the main layer, I need to create an instance of the extended class and return
  2. I can easily get a JSON answer with that, but for every object, a type of package will be created.

Please guide me to have a design template for this