Here you decide. But using ready-made solutions ( gson
, jackson
, etc.) you get:
- Ready solution out of the box. Saves development time
- Sophisticated interfaces that allow the use of both existing and samopisnyh variants of the serialization / deserialization solution for "not ordinary" cases
- A lot of literature and forums where, in which case, you can find a solution to the problem.
The use of your "custom" classes will already depend on how you implement them.
Most likely, of course, they will be a little less effective (because as if you didn’t have to do jumps with realization, you wouldn’t bother).
But in fact, if you do everything correctly, you will not feel the difference.
PS: in the course of our work, we often use for converting, for example, date formats, data transliteration for the end user. There were no problems. If performance measurements were different, then in milliseconds or even less