@Rosdi Its important to note, that just because a class i marked as Serializable, doesn’t mean that you can convert it to JSON. JSON only support so and so many datatypes and is not able to represent all .net types.
That a class is Serializable means, that .net is able to “dump” the content of the class-instance and recreate the instance again from that “dump”. The easiest is to represent the dump is a binary file, which can then be saved in a text-file using Base64 encoding.
That is basically whats going on here