Posts

Showing posts from August, 2020

Differences GSON vs JSON

Image
What is GSON?            GSON adalah library racikan Google untuk melakukan serialisasi dan deserialisasi data JSON dengan mudah.  Serialisasi adalah proses mengubah objek Java menjadi JSON, sedangkan deserialisasi adalah proses mengubah JSON menjadi objek Java. Serialisasi dan deserialisasi biasanya dilakukan saat kita bekerja dengan  webservice .           We need serialization because the hard disk or network infrastructure are hardware component and we cannot send java objects because it understands just bytes and not java objects.           Serialization is used in the cases where you want to save an object state and convert that object into byte stream, objects need to be serialized. While you're running your application, all of its objects are stored in memory (heap memory). When you exit, that memory gets reclaimed by the operating system, and your program essentially 'forget...