Match between Classes in backend server and frontend?

Hi suppose a game needs two parts a backend server and frontend (client). The server sends json strings and contains controllers and logics of the game while the client section is responsible for views. The question is that I need two type of classes to handle them? One type is classes that correspond to json strings (classes defined in the server) received from the server and the another one is classes that we need to use them to illustrate information.
Example: The class below corresponds to server js class sent as json format to the client side

[System.Serializable]
public class UserData{
   public int gem;
   public int coin;
   public int level;
   public int score;
   public int cup;
   public bool hasShield;
   public int shieldLeftTime;
   //....
}

But I do not want to show all of them in one page for example. So I need to break them to several smaller classes like below:

public class UserAsset{
   public int gem;
   public int coin;
}
public class UserLevel{
   public int level;
   public int score;
}
public class Shield{  
   public bool hasShield;
   public int shieldLeftTime;
}

Also maybe I need to show only level of a user and shield status in other page or panel! So I need to create a new class?!

public class Class{
   public int hasShield;
   public int level;
}

or I need to match the classes in both server side and client side both smaller and suitable classes and prevent to create extra classes?
And my second question is about that the classes can have functions or not, they are only data structures.

How approach do you follow? thanks

They can have functions. Those functions will run locally though, on the local data.

Unity won’t fuse the smaller classes together into the larger one used by the server. So if you expected that, no it won’t happen.

If you send an object with fewer fields than the receiving classes type has defined. That just means those specifically defined fields will be populated, but all others won’t. So you can technically do this… but your server will need to know no to expect all the data to be filled. (I can’t guarantee this… just my working knowledge of the serializer implies it’s doable)

I wouldn’t use the unity serializer for this…

The problem is not unity serialization. The problem is that the server sends big json data. First the client needs to define exactly the corresponding class to match the json but it does not need all data to show them in a panel. So the client requires extra classes to be able to match with special view (panel data)?!