I am using azure java sdk to collect assets from my azure account. I want to store the information in json format and later on i want to convert json back to original objects when needed. However when I serialize an object to json, its not writing all the properties. For example I am collecting Disk object as
PagedList<Disk> diskPagedList =azure.disks().list();
for(Disk disk: diskPagedList)
{
String json = JsonSerializer.writeValueAsString(disk);
//SaveToDatabase(json);
}
The returned json for each disk looks like
{"attachedToVirtualMachine":false,"inCreateMode":false,"hot":false}
It does not have any fields except three above. I tried with disk.inner() as well, it gives some more properties but those are also limited.
Is there a way to convert this complete object into json?